SMALL FOOTPRINT, INFINITE INTELLIGENCE.
1from tinyagent import tool, ReactAgent
2
3  @tool
4  def multiply(a: float, b: float) -> float:
5      """Multiply two numbers together."""
6      return a * b
7
8  @tool
9  def divide(a: float, b: float) -> float:
10      """Divide the first number by the second."""
11      return a / b
12
13  agent = ReactAgent(tools=[multiply, divide])
14  result = agent.run(
15      "What is 12 times 5, then divided by 3?"
16  )
17  # → 20

Plan, execute, see the trace.

TinyAgent queues tool calls, runs them in order, and keeps the full trace in view.

Maps the call graph before touching your code.
Shares cached outputs so follow-ups stay instant.
Returns the result with a tidy execution log.
Step 1

multiply(12, 5) → 60

Step 2

divide(60, 3) → 20

Step 3

Report: 20

Zero Boilerplate. Pure Magic.

Just decorate functions with @tool and let the agent orchestrate everything for you.

Automatic Reasoning

Agents chain calls, reuse intermediate results, and pick the optimal path without prompts.

Built-in LLM Support

Ships with OpenRouter integration. Swap models like GPT-4, Claude, or Llama in one line.

Type Safe by Design

End-to-end validation, retries, and predictable signatures keep production calm.

Built for people who like tidy systems.

See every decision the agent makes so your code stays predictable.

Simplicity

Compact surface area that stays out of your way.

Transparency

Local-first architecture with no hidden remote calls.

Precision

Every abstraction earns its keep. No fluff.

Autonomy

Agents operate for you, not the cloud vendor.

Three commands, that’s it.

Create a virtual env, install TinyAgent, point it at your key.

Bootstrap

1uv venv
2source .venv/bin/activate
3uv pip install tiny_agent_os

Environment

1export OPENAI_API_KEY=your_openrouter_key_here
2export OPENAI_BASE_URL=https://openrouter.ai/api/v1

Multi-step logic, no extra ceremony.

Write tools as plain Python. TinyAgent works out the order and explains its answer.

1from tinyagent import tool, ReactAgent
2
3@tool
4def calculate_percentage(value: float, percentage: float) -> float:
5    """Calculate what percentage of a value is."""
6    return value * (percentage / 100)
7
8@tool
9def subtract(a: float, b: float) -> float:
10    """Subtract b from a."""
11    return a - b
12
13agent = ReactAgent(tools=[calculate_percentage, subtract])
14result = agent.run("If I have 15 apples and give away 40%, how many are left?")
15print(result)  # -> "You have 9 apples left."

Brave results without leaving the run.

Pull the Brave Search tool when you need fresh data and keep the answer inside the reasoning trace.

  • Structured answers ready for quick comparison.
  • Switch models mid-run to cross-check the findings.
1from tinyagent import ReactAgent
2from tinyagent.base_tools import web_search
3
4agent = ReactAgent(tools=[web_search])
5agent.run("What are the latest Python web frameworks?")
6
7agent = ReactAgent(tools=[web_search])
8agent.run("Compare FastAPI vs Django performance")

Resources

Business Source License 1.1 — free under $1M ARR. Enterprise? email info@alchemiststudios.ai.

Tiny. Local. Lethal.