Nanobot Architecture and Runtime
1. The workspace shape​
The repo layout is one of the quickest ways to understand Nanobot:
| Area | Why it matters |
|---|---|
nanobot/ | Main Python package and agent runtime |
docs/ | Architecture and development guidance |
scripts/ | Install and project bootstrap helpers |
Dockerfile and docker-compose.yml | Containerized runtime and deployment path |
| bridge-related code | External integration surface |
The project is small enough that you can still read it as a whole, which is one of its advantages.
2. The runtime mental model​
At a high level, Nanobot follows a familiar agent shape:
- user or system input arrives,
- the runtime prepares context,
- the model decides whether to answer directly or use a tool,
- tool calls execute,
- results return to the model turn,
- the final output is returned through the active surface.
That sounds standard, but the useful part is that Nanobot keeps this loop relatively approachable for developers who want to understand or customize it.
3. Why the architecture feels lightweight​
Nanobot is not trying to be a giant enterprise control plane. Its architecture is closer to:
one agent runtime with optional supporting surfaces
than to:
a fleet-management system for thousands of long-running agents
That changes how you should read the code. You are mostly looking for runtime flow, tool wiring, and integration boundaries, not for distributed scheduling layers.
4. The UI and bridge surfaces​
The presence of a web UI and bridge-related code suggests a useful division of responsibility:
- the core package owns agent behavior,
- the UI layer owns interaction and visibility,
- the bridge layer owns external handoff or integration behavior.
That is a clean separation for a project of this size because it lets you change one surface without rewriting the whole runtime.
5. What to read first in code​
If you want to study the implementation, start here:
- the architecture doc,
- the main
nanobot/package, - install and entrypoint scripts,
- Docker-related files,
- development docs once you are ready to contribute.