Iter Iter

Terminal-Based AI Agent

An agentic CLI with reasoning mode, file operations, session persistence, and MCP tool integration. A full AI coding assistant that runs in your terminal.

iter chat — qwen3-coder:32b
$ iter chat

Iter Chat

Connected to agent-server. Type your message and press Enter.

Model: qwen3-coder:32b | MCP: 3 servers

you > read src/main.py and explain the architecture

Using tool: iter_get_file

The app follows a FastAPI + service layer pattern:

  • main.py — App factory with lifespan, mounts routers
  • endpoints/ — Route handlers, thin wrappers over services
  • services/ — Business logic, DB access, external calls
  • models.py — Pydantic models for request/response

384 tokens | 1.2s

you > /reason add a health check endpoint with db ping

Reasoning...

The existing pattern uses router modules in endpoints/. I should add a new health.py router with a /health GET endpoint that pings the database connection pool...

Here's the implementation:

@router.get("/health")

async def health_check(db: AsyncSession = Depends(get_db)):

await db.execute(text("SELECT 1"))

return {"status": "ok"}

Add this to endpoints/health.py and mount in main.py.

612 tokens | 2.8s

you > /save health-check-session
Session saved: health-check-session (3 messages)
you > _

CLI capabilities

1

Streaming chat

Real-time SSE streaming from local Ollama models with Rich terminal formatting. Markdown rendering, syntax highlighting, and structured output.

2

Reasoning mode

Chain-of-thought reasoning for complex problems. Structured output with explicit thinking and answer sections. Toggle per-query or globally.

3

File operations

Read, write, list, and analyze files with per-directory permission guards. MCP filesystem fallback for sandboxed access.

4

Session persistence

Save and load conversations to disk. Resume where you left off. Full session history with metadata tracking.

5

Project analysis

AI-powered codebase understanding. Directory tree visualization, file summaries, and architecture analysis.

Built-in commands

Chat & reasoning

/reason for chain-of-thought, /model to switch models, /temp and /tokens for generation params.

File operations

/read, /write, /ls, /tree with syntax highlighting and permission guards.

Sessions

/save, /load, /sessions for persistent conversations. Resume any previous session.

MCP tools

/tools, /servers, /connect for MCP server management. Auto tool discovery and execution.

Security model

The CLI uses a per-directory permission system for safe file access:

Read permissions

Granted per-directory. Access history tracked for audit.

Write permissions

Explicit approval required. Subdirectory management with allow/deny lists.

Execute permissions

Code execution requires sandbox MCP server. Pre-execution confirmation.

Your terminal, your AI