π PortuguΓͺs
AI programming assistant that runs in the terminal, powered by local models via Ollama. Features persistent sessions, long-term memory, autonomous tool execution, and parallel subagent orchestration.
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
β julia> create a REST server with 3 endpoints β
β β
β π Complex task β spawning 3 subagents... β
β β Subagent: endpoint GET /users β
β β Subagent: endpoint POST /users β
β β Subagent: endpoint DELETE /users/:id β
β β
3 completed, no failures β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Node.js >= 18
- Ollama running locally (
http://localhost:11434)
npm i -g juliacodejuju # start chat
juju --session <id> # resume existing sessionjuju --gateway # default: 127.0.0.1:18800
juju --gateway --host 0.0.0.0 --port 3000 # custom host/portEndpoints:
| Method | Route | Description |
|---|---|---|
GET |
/health |
Health check |
GET |
/sessions |
List sessions |
POST |
/sessions |
Create session |
GET |
/sessions/:id |
Session details |
GET |
/sessions/:id/messages |
Session messages |
POST |
/chat |
Chat (full response) |
POST |
/chat/stream |
Chat (SSE streaming) |
Julia has access to 10 tools that it executes autonomously:
| Tool | Description |
|---|---|
exec |
Run shell commands (git, npm, etc.) |
read |
Read files with line numbers |
write |
Create/overwrite files |
edit |
Replace text segments in files |
glob |
Search files by glob pattern |
grep |
Search content with regex |
fetch |
Access URLs, APIs, and web pages |
memory |
Persistent memories across sessions |
sessions |
Manage saved sessions |
subagent |
Orchestrate parallel subagents |
When enabled, Julia automatically detects complex, parallelizable tasks and spawns independent subagents with their own sessions. Each subagent can use a different model.
Orchestration Run (run_id)
βββ SubagentRun 1 β web scraper [gpt-oss:120b-cloud] completed 2.3s
βββ SubagentRun 2 β csv processor [qwen3:8b] completed 1.8s
βββ SubagentRun 3 β api server [qwen3.5:397b-cloud] completed 3.1s
All runs are persisted in SQLite with status lifecycle (queued β running β completed/failed), timestamps, and duration.
To connect a new MCP server, edit ~/.juliacode/settings.json and add the mcpServers section:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/user"],
"env": {}
}
}
}Each entry in mcpServers is an MCP server with:
| Field | Required | Description |
|---|---|---|
command |
yes | Command to start the server |
args |
no | Array of arguments (default: []) |
env |
no | Extra environment variables for the process |
Example with multiple servers:
{
"models": { "default": "qwen3:8b" },
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/user"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_TOKEN": "ghp_yourtoken" }
},
"sqlite": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sqlite",
"/path/to/database.db"
]
}
}
}When Julia Code starts, it connects to each server and automatically registers their tools. The agent will see tools named like mcp__filesystem__read_file,
mcp__github__create_issue, etc. It can use them normally during conversation. To remove a server, just delete the entry and restart.
{
"models": {
"provider": "ollama",
"baseUrl": "http://localhost:11434",
"default": "qwen3:8b"
},
"agent": {
"maxToolIterations": 10
},
"session": {
"compactionThreshold": 6000,
"compactionKeepRecent": 6
},
"storage": {
"dbPath": "./data/julia.db"
},
"acp": {
"enabled": false,
"autoOrchestrate": false,
"maxConcurrent": 3,
"subagentMaxIterations": 15,
"defaultModel": null
},
"memory": {
"semantic": {
"enabled": false,
"provider": "ollama",
"embeddingModel": "nomic-embed-text",
"rankingWeights": { "similarity": 0.6, "importance": 0.3, "recency": 0.1 },
"recencyHalflifeDays": 30,
"maxMemories": 5,
"availabilityCheckTtlMs": 30000,
"autoBackfillOnStart": false
}
}
}With memory.semantic.enabled: false (default), Julia injects the 30 most-recent memories into the system prompt, just like before.
With memory.semantic.enabled: true, Julia uses embeddings (via Ollama nomic-embed-text) to rank memories by relevance to the current user input. Flow:
- Pull
nomic-embed-textonce:ollama pull nomic-embed-text. - Flip
memory.semantic.enabledtotruein~/.juliacode/settings.json. - Run
juju memory backfillto populate embeddings for existing memories. - Set
memory.semantic.autoBackfillOnStart: trueif you want new boots to resume backfilling automatically.
If the embedding provider is unavailable at any point (Ollama down, model missing, request fails), Julia degrades transparently to the legacy recent-memories injection β the app never breaks because of a missing embedding.
juju.ts # Entry point (CLI)
src/
βββ agent/
β βββ loop.ts # Agent loop (LLM β tools)
β βββ subagent.ts # Subagent manager + orchestration
β βββ queue.ts # Execution queue
β βββ context.ts # Context building + compaction
βββ config/
β βββ index.ts # Config loading
β βββ workspace.ts # Workspace directory
βββ gateway/
β βββ server.ts # HTTP REST API
βββ providers/
β βββ registry.ts # Provider registry
β βββ ollama.ts # Ollama provider
βββ session/
β βββ db.ts # SQLite schema (7 tables)
β βββ manager.ts # CRUD sessions, messages, memories, runs
βββ skills/
β βββ loader.ts # Skills loader
β βββ defaults/ # Built-in skills (base, coder, memory, subagent)
βββ tools/
β βββ registry.ts # Tool registry
β βββ exec.ts, read.ts, ... # Implementations
β βββ subagent.ts # Subagent tool
βββ tui/
βββ app.tsx # Terminal interface (React + Ink)
SQLite with WAL mode. 7 tables:
- sessions β conversations with title, model, tokens
- messages β user/assistant/tool messages with tool_calls
- compactions β summaries of old context
- memories β persistent memories with categories
- orchestration_runs β subagent batches with status/duration
- subagent_runs β individual tasks with full lifecycle
| Layer | Technology |
|---|---|
| Runtime | Node.js (ESM) |
| Language | TypeScript |
| UI | React 18 + Ink |
| Database | SQLite (better-sqlite3) |
| LLM | Ollama |
| Tests | Vitest |