first 10 minutes

Start with
one graph.

Keep your solver. Methodos adds a typed, queryable memory layer around the actions your agent already understands.

Install the package

The core package uses SQLite by default. Install only the capabilities you need.

pip install methodos
# Optional capabilities
pip install "methodos[postgres]"  # horizontal deployments
pip install "methodos[vec]"       # sqlite-vec matching
pip install "methodos[eval]"      # evaluation harness

Build a graph

A graph describes actions, transitions, and the conditions that make a next step useful.

from methodos import Attribute, Edge, Node, ProceduralGraph, Relation

graph = ProceduralGraph(
    id="support-agent",
    nodes={
        "start": Node(id="start"),
        "search": Node(id="search", description="search a trusted source"),
        "answer": Node(id="answer"),
    },
    edges=[Edge(
        src="start",
        dst="search",
        relation=Relation.LEADS_TO,
        attribute=Attribute(
            condition="the answer needs evidence",
            guidance="search with a focused query",
            pitfalls="do not search with the whole conversation",
        ),
    )],
    terminal_ids={"answer"},
)

Add the adapter

Implement the small async Solver protocol and inject an LLM client. The adapter owns the guidance context; your host owns observations and external tools.

from methodos import AgentState, PGAdapter, Solver

class MySolver:
    async def step(self, state: AgentState) -> str:
        return "search"

adapter = PGAdapter(solver=MySolver(), graph=graph, llm=llm)
action = await adapter.step(query="Where is the order?", trajectory=[])

Run the hosted service

For local development, use the CLI or Uvicorn. Production mode requires credentials and durable SQLite/Postgres persistence.

methodos init
uvicorn methodos.service:app --reload --host 127.0.0.1 --port 8000
curl http://127.0.0.1:8000/health
The default app is intentionally conservative: evolution work requires an injected durable runner. Do not run LLM evolution inline in an API process.