PYTHON NATIVE.OPEN SOURCE. TERMINAL FIRST.

A coding agent. A connected workspace.

Your terminal.
More capable.

Think in Python. Work through your tools.
Keep the whole process in your terminal.

Get started
01 / THINK02 / CODE03 / EXECUTE
THE AGENT, AT WORKONE PROMPT. CONNECTED ACTIONS.
▧   pylattice / workspace
PyLatticeCODE MODE
main ~/your-next-idea approvals on
A fresh prompt. A place to begin.

Tell me what you're building.
We'll take it one step at a time.

you

Help me understand this project.

pylattice

I'll map the files and follow the entry points.

✓execute_code3 tool calls
files = await call_tool("list_files", {"path": "src"})
entry = await call_tool("read_file", {"path": "src/main.py"})
config = await call_tool("read_file", {"path": "pyproject.toml"})

Your project, a little clearer.

src/main.pyThe starting point
src/tools/The building blocks
tests/The safety net
Interactive preview / simulated sessionTry a task above ↗
SMALL PROGRAMS.
CONNECTED TOOLS.
Python 3.11+ OpenRouter Monty Textual MCP

01 / THE WORKFLOW

One thought.
A whole chain of action.

No juggling tool calls. No losing the thread.
Just a clear path from “what if” to what’s next.

01

Start with an idea.

Describe a task in your terminal. PyLattice brings the relevant history, workspace tools, and skills into context.

Help me find my way around.
02

Let Python connect it.

Code Mode writes a Python program that calls tools and passes results between them, all within a single run.

await call_tool(name, args)
03

Keep the whole picture.

Follow a continuous transcript, expand tool traces, and approve actions. Every step stays close to the prompt.

A clear result. Room to keep going.

02 / SMALL PROGRAMS. REAL PROGRESS.

More doing.
Less back-and-forth.

Some tasks need a sequence, not another conversation. Code Mode lets one Python program read files, use their results, and return what matters.

Dependent tool calls in a single run

Syntax and types checked before execution

Workspace policies and approvals stay in place

Explore Code Mode
A PROGRAM, NOT A PILE OF PROMPTSPYTHON
explore_workspace.py illustrative example
# Find the pieces.
listing = await call_tool(
    "list_files", {"path": "src"}
)

# Connect them in one run.
results = []
for path in listing["output"]["files"][:3]:
    result = await call_tool(
        "read_file", {"path": path}
    )
    results.append(result["output"])

# Bring back what matters.
results

03 / MAKE IT YOURS

A little structure.
Nothing boxed in.

Start with the defaults.
Build out the way you like to work.

04 / YOUR NEXT IDEA STARTS HERE

Make yourself
at home.

A terminal. A little Python.
And something you want to build.

Python 3.11+uvOpenRouter API key
Read the setup guide
~/PyLattice
01 / Make it local
git clone https://github.com/Protocol-Lattice/PyLattice.git
cd PyLattice
02 / Set things up
uv sync
cp .env.example .env

Add your OPENROUTER_API_KEY to .env.

03 / Meet your agent
uv run agent-tui
Ready for your first prompt.

05 / GOOD QUESTIONS

A few things
before you start.

Can I try it without an API key?

Yes. After installing dependencies, run uv run agent-tui --demo. The offline demo needs no credentials and makes no network requests.

What runs inside the sandbox?

Code Mode programs run in Monty, with no direct host filesystem or network access. They reach the workspace through validated tool calls, which keep workspace policies, middleware, and approvals in place.

Can I bring my own tools?

Connect MCP servers, add SKILL.md workflows, or use middleware hooks. Python factories also let you replace components such as providers, prompts, tools, and routing.

How do I stay in control?

Inspect tool traces and approve actions in the terminal. Press Esc to stop a running program, or launch with --read-only to disable mutating tools.

YOUR NEXT IDEA STARTS HERE.[ PY ]

Less friction.
More possibility.

Build with PyLattice