Versatile autonomous AI agent with three-agent architecture (Manager, Worker, Client) powered by gpt-oss-120b. Adaptive validation, full MCP support, and intelligent quality control.
$git clone https://github.com/karmaloopai/jivaInstalls into the current project.
Install jiva by running `git clone https://github.com/karmaloopai/jiva`, then use it for the current task and follow its documentation at https://github.com/karmaloopai/jiva.
| 1 | # Jiva |
| 2 | |
| 3 | [](https://www.npmjs.com/package/jiva-core) |
| 4 | [](LICENSE) |
| 5 | [](https://github.com/KarmaloopAI/Jiva) |
| 6 | |
| 7 | Jiva is an autonomous AI agent for the terminal and cloud. It works with any OpenAI-compatible model provider and supports two execution modes — a general-purpose two-agent system (Manager + Worker) for complex tasks, and a code-optimized single-loop engine with LSP integration for software engineering. |
| 8 | |
| 9 | ## Demo |
| 10 | |
| 11 |  |
| 12 | |
| 13 | --- |
| 14 | |
| 15 | ## Installation |
| 16 | |
| 17 | ```bash |
| 18 | npm install -g jiva-core |
| 19 | jiva setup |
| 20 | |
| 21 | # Verify your model + config can do code mode well: |
| 22 | jiva benchmark |
| 23 | ``` |
| 24 | |
| 25 | The setup wizard opens with a provider selection menu. Choose your provider and Jiva auto-fills the endpoint, model name, and tool format — you only supply your API key. Supported providers: **Krutrim**, **Groq**, **Sarvam**, **OpenAI**, and any **OpenAI-compatible** endpoint. |
| 26 | |
| 27 | After setup, run **`jiva benchmark`** to confirm your chosen model and configuration work optimally in code mode. It runs the **baseline (taskstore) suite** — a deterministic set of coding tasks — against your config; a healthy setup passes all of them. See [Benchmarking](#benchmarking) for tuning and capability comparison. |
| 28 | |
| 29 | ### Development install |
| 30 | |
| 31 | ```bash |
| 32 | git clone https://github.com/KarmaloopAI/Jiva.git |
| 33 | cd Jiva |
| 34 | npm install && npm run build && npm link |
| 35 | jiva setup |
| 36 | ``` |
| 37 | |
| 38 | --- |
| 39 | |
| 40 | ## Quick Start |
| 41 | |
| 42 | ```bash |
| 43 | # General-purpose interactive session |
| 44 | jiva chat |
| 45 | |
| 46 | # Code mode — optimized for software engineering tasks |
| 47 | jiva chat --code |
| 48 | |
| 49 | # Code mode with plan-then-approve flow |
| 50 | jiva chat --code --plan |
| 51 | |
| 52 | # Single prompt |
| 53 | jiva run "What changed in the last 5 commits?" |
| 54 | |
| 55 | # Single prompt in code mode |
| 56 | jiva run "Add error handling to the database module" --code |
| 57 | ``` |
| 58 | |
| 59 | ### REPL commands |
| 60 | |
| 61 | | Command | Description | |
| 62 | |---------|-------------| |
| 63 | | `/help` | Show available commands | |
| 64 | | `/tools` | List active tools | |
| 65 | | `/servers` | Show MCP server status | |
| 66 | | `/save` | Save current conversation | |
| 67 | | `/load` | Resume a saved conversation | |
| 68 | | `/list` | Browse all saved conversations | |
| 69 | | `/reset` | Clear conversation history | |
| 70 | | `/<skill-name>` | Load a skill (e.g. `/graphify`) | |
| 71 | | `/exit` | Exit Jiva | |
| 72 | |
| 73 | --- |
| 74 | |
| 75 | ## Execution Modes |
| 76 | |
| 77 | ### General mode (default) |
| 78 | |
| 79 | A two-agent pipeline designed for complex, multi-step tasks: |
| 80 | |
| 81 | ``` |
| 82 | User Request |
| 83 | ↓ |
| 84 | Manager Agent — plans, decomposes, and synthesizes |
| 85 | ↓ |
| 86 | Worker Agent — executes subtasks with MCP tools |
| 87 | ↓ |
| 88 | Response |
| 89 | ``` |
| 90 | |
| 91 | The Worker has access to any configured MCP server (filesystem, browser automation, shell commands, etc.). The Manager synthesizes results from all subtasks into a final coherent response. Simple conversational messages are answered directly without executing subtasks. |
| 92 | |
| 93 | ### Code mode (`--code`) |
| 94 | |
| 95 | A single streaming loop optimized for coding tasks: |
| 96 | |
| 97 | ``` |
| 98 | User Request |
| 99 | ↓ |
| 100 | CodeAgent |
| 101 | loop until done: |
| 102 | LLM call with tool definitions |
| 103 | ↓ |
| 104 | Tool execution (in-process, no subprocess) |
| 105 | ↓ |
| 106 | LSP feedback after file edits |
| 107 | ↓ |
| 108 | Response |
| 109 | ``` |
| 110 | |
| 111 | Code mode reduces latency by eliminating inter-agent overhead and running all file tools directly in the Node.js process. It includes a multi-strategy edit engine that reliably handles indentation drift and whitespace inconsistencies. |
| 112 | |
| 113 | **Available tools in code mode:** |
| 114 | |
| 115 | | Tool | Description | |
| 116 | |------|-------------| |
| 117 | | `read_file` | Read files with line numbers, list directories | |
| 118 | | `edit_file` | Multi-strategy string replacement (9 strategies) | |
| 119 | | `write_file` | Create or overwrite files | |
| 120 | | `glob` | Find files by pattern | |
| 121 | | `grep` | Regex content search | |
| 122 | | `bash` | Run shell commands | |
| 123 | | `spawn_code_agent` | Delegate a sub-task to a child agent | |
| 124 | |
| 125 | **MCP servers in code mode:** Code mode does not load all MCP servers by default (too many tools bloat the context). You opt in explicitly: |
| 126 | |
| 127 | ```bash |
| 128 | # Per-invocation: pass server names via --mcp (comma-separated) |
| 129 | jiva chat --code --mcp browser |
| 130 | jiva chat --code --mcp browser,postgres |
| 131 | |
| 132 | # Persistent: set codeMode:true on any server in your config |
| 133 | jiva config |
| 134 | # or edit ~/.config/jiva/config.json: |
| 135 | # "mcpServers": { "browser": { "command": "...", "codeMode": true } } |
| 136 | ``` |
| 137 | |
| 138 | When MCP servers are active in code mode, their tool names (e.g. `browser__screenshot`) are listed in the startup banner and the agent's system prompt. |
| 139 | |
| 140 | **LSP integration:** After each file edit, Jiva notifies the appropriate language server and appends any compiler errors to the tool result. Language servers are auto-detected from your PATH. If none is installed for a given language, the tool continues silently. |
| 141 | |
| 142 | ```bash |
| 143 | # Install language servers (optional but recommended for code mode) |
| 144 | npm install -g typescript-language-server typescript # TypeScript / JavaScript |
| 145 | pip install python-lsp-server # Python |
| 146 | go install golang.or |