krishna-agent
v1.0.0
Published
Krishna — Your autonomous AI developer agent. Plans, executes, and uses tools to complete complex tasks.
Maintainers
Readme
Krishna — Autonomous AI Developer Agent
Krishna is a modular, local-first AI agent with a chat interface, tools, RAG knowledge base, and step-by-step task execution.
Built with Next.js 15, LangChain, and OpenAI / Ollama.
For Teammates — Get Started in 3 Steps
Option A: Install via npm (recommended)
# 1. Install Krishna globally
npm install -g krishna-agent
# 2. Create your project
krishna init my-krishna
# 3. Configure LLM (pick one below) then start
cd my-krishna
krishna startOption B: Clone from GitHub
git clone https://github.com/YOUR_USERNAME/krishna-agent.git
cd krishna-agent
npm install
cp .env.example .env.local
# Configure .env.local then:
npm run devConfigure Your LLM
Open .env.local (copy from .env.example) and pick one:
OpenAI (cloud)
OPENAI_API_KEY=sk-your-key-here
OPENAI_MODEL=gpt-4o-miniOllama (local, free, no API key)
brew install ollama
ollama pull llama3.2 # ~2GB chat model
ollama pull nomic-embed-text # for semantic search
ollama serveUSE_OLLAMA=true
OLLAMA_MODEL=llama3.2Load Your Docs / Codebase
Krishna can answer questions about your code if you give it to her first:
# Index a repo
krishna ingest ./my-project
# Index docs or specific files
krishna ingest ./docs README.md
# Index a URL
krishna ingest https://docs.yourproject.com
# Check what's loaded
krishna ingest --statsKrishna will automatically search the knowledge base when answering questions about your project.
CLI Commands
krishna init [dir] # Create a new project
krishna chat # Chat with Krishna in the terminal ← new
krishna chat --simple # Quick Q&A mode (no agent pipeline)
krishna start # Start the web UI → http://localhost:3000
krishna build # Production build
krishna ingest <path> # Add docs/code to knowledge base
krishna status # Show system + KB health
krishna help # All commandsTerminal Chat
$ krishna chat
██╗ ██╗██████╗ ██╗███████╗██╗ ██╗███╗ ██╗ █████╗
...
Session: a3f7c1d2 • Mode: Agent • Server: http://localhost:3000
You [agent] Give me a task or ask anything...
You [agent] Calculate the 10 most common words in README.md
Krishna 🗂️ Creating execution plan...
Plan:
1. Read the README.md file
2. Execute code to count word frequency
3. Return the top 10 words
▶ Step 1: Read README.md
→ tool: read_file
✓ done
▶ Step 2: Count words with code
→ tool: execute_code
✓ done
...In-chat slash commands:
/agent Switch to Agent Mode (full planning + tools)
/chat Switch to Chat Mode (quick Q&A)
/ingest /ingest ./src — load files live
/clear Clear terminal
/status System health
/quit Exit (also Ctrl+C)Features
| Feature | Description | |---------|-------------| | Agent Mode | Full Planner → Executor → Evaluator pipeline | | Chat Mode | Quick Q&A with streaming | | Knowledge Base | RAG from your docs/codebase | | 9 Tools | File I/O, web fetch, code execution, search | | Ollama | Run 100% locally, no API key | | Memory | Per-session + persistent long-term | | Streaming | Real-time step-by-step execution trace |
Architecture
User → Planner → Executor → Tools → Evaluator → Response
↕
Knowledge Base (RAG)
↕
Memory (short + long term)See docs/architecture.md for the full breakdown.
Documentation
| Guide | Description | |-------|-------------| | Setup | Full install guide | | Architecture | How Krishna works | | Create Agent | Add tools and custom agents | | Prompt Engineering | Customize Krishna's behavior | | Testing | Test cases and benchmarks |
Publishing Your Own Version
# Update name/version in package.json
# Then publish to npm:
npm login
npm publish
# Teammates install with:
npm install -g your-package-nameLicense
MIT
