CODE-ACT · FRAMEWORK · APACHE 2.0

Agents that do
real work.

Delfhos is the open-source code-act framework. Your agents write and execute real Python against your real tools. No simulated actions, no black boxes.

Read the docs
api_agent.py
from delfhos import Agent, APITool
 
# Point at any OpenAPI spec — every endpoint becomes a tool
api = APITool(
spec="https://finnhub.io/static/swagger.json",
headers={"X-Finnhub-Token": os.environ["FINNHUB_KEY"]},
cache=True, # avoid redundant HTTP calls
)
 
agent = Agent(tools=[api], llm="claude-sonnet-4-6")
result = agent.run("Current price and P/E ratio for AAPL")
 
print(result.text)
agent.stop()

Why Delfhos

Built for production work, not demos.

Three principles shape every line of the framework.

Real code, really executed.

Your agent emits Python and runs it in a sandbox — every action is auditable, reproducible, and debuggable. No simulated tool calls.

Bring your own tools.

Wrap any function with @tool. Plug in Gmail, Sheets, REST APIs from OpenAPI specs, or your internal services in minutes.

Open & secure by default.

Apache 2.0. Sandboxed runtime, scoped credentials, full traces. Self-host anywhere — your code, your infra, your rules.

How it works

Three lines from import to action.

Define your tools, hand them to an Agent, ask it for an outcome. The framework handles the loop, the parsing, and the execution.

01

Wire your tools

Built-ins for Gmail, Sheets, OpenAPI services. Or wrap any function with @tool.

02

Hand them to Agent

Pick an LLM, pass your toolkit, set a budget. One object, one call.

03

Ask for outcomes

Agent writes Python, runs it, recovers from errors, returns a verifiable trace.

An agent that can't run code
is just an expensive autocomplete.

Start building in three lines.

Open source · Apache 2.0 · Self-hostable · No vendor lock-in.