Skip to content

Conversation

@chrisnk1
Copy link

Title

feat(coding-agent): add standalone streaming codegen CLI and docs

Summary

Introduces a self-contained coding agent example that streams code generation from local Ollama models via LangChain. This lives outside the RAG pipeline and is runnable with a single command.

Motivation

  • Decouple coding-agent experimentation from the RAG pipeline.
  • Provide a minimal, fast-to-run baseline that works with local models (e.g., gemma3, mistral).
  • Establish a foundation for upcoming multi-agent (LangGraph) work.

What’s included

  • coding_agent_example/run.py: simple streaming code generator using ChatOllama and a minimal prompt.
  • coding_agent_example/start.sh: one-liner wrapper with sensible defaults.
  • coding_agent_example/tools.py and coding_agent_example/agent.py: scaffolding for future tool/agent work (not used by the simple CLI).
  • coding_agent_example/requirements.txt: minimal deps for the example.
  • coding_agent_example/README.md: quickstart, advanced usage, and next-steps plan.

How to run

  • Simplest:
ollama pull gemma3:4b
./coding_agent_example/start.sh
  • Advanced:
uv run -p 3.11 --with coding_agent_example/requirements.txt \
  python coding_agent_example/run.py --repl --model gemma3:latest --base-url http://localhost:11434
  • Single-shot to file:
uv run -p 3.11 --with coding_agent_example/requirements.txt \
  python coding_agent_example/run.py --model gemma3:latest --language python --output scratch/example.py

Notes

  • Streams tokens for responsive UX; logs show model selection, connectivity, and completion stats.
  • Autodetects a usable Ollama model if --model isn’t provided.
  • Keeps the RAG stack untouched.

Next steps (planned follow-up PRs)

  • Implement a multi-agent architecture using LangGraph, following the Open SWE pattern:
    • Manager: orchestrates workflow and user interaction.
    • Planner: researches the codebase/requirements and proposes a plan (pauses for human approval).
    • Programmer: executes the approved plan (write/modify repo code).
    • Reviewer: validates via tests/linters and verifies the issue is resolved.
  • Add human-in-the-loop checkpoints, telemetry, and error recovery.
  • Gradually introduce safe file ops and repo-wide context ingestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant