Skip to content

SDK Overview

The SDK is the easiest way to understand SEOCHO. It gives you the same core contract in three shapes: embedded local mode, explicit graph backend mode, and remote runtime mode.

ModeConstructorUse when
Embedded localSeocho.local(ontology)you want the fastest first run
Explicit backendSeocho(ontology=..., graph_store=..., llm=...)you want Neo4j or DozerDB control
Remote runtimeSeocho(base_url="http://localhost:8001")another process owns the runtime

Most people should start with embedded local mode.

Terminal window
uv pip install "seocho[local]"

For HTTP client mode only:

Terminal window
uv pip install seocho

For repository development:

Terminal window
uv sync --extra dev
from seocho import Seocho, Ontology, NodeDef, RelDef, Property
ontology = Ontology(
name="work",
nodes={
"Person": NodeDef(properties={"name": Property(str, unique=True)}),
"Company": NodeDef(properties={"name": Property(str, unique=True)}),
},
relationships={
"WORKS_AT": RelDef(source="Person", target="Company"),
},
)
client = Seocho.local(ontology, llm="mara/MiniMax-M2.5")
client.add("Marie Curie worked at the University of Paris.")
print(client.ask("Where did Marie Curie work?"))
StageWhat happens
Extractiontells the model which facts should become graph nodes and edges
Graph writeskeeps generated facts shaped by constraints and provenance
Queryinggives retrieval and Cypher generation the same schema context
Repairkeeps retries bounded when the first query is too weak
Runtimeproduces artifacts that other agents can consume through HTTP
APIWhat it is for
client.add(text)index one text item
client.add_batch(items)index multiple text items
client.index_directory(path)index files from disk
client.ask(question)ask the semantic graph path
client.ask(..., reasoning_mode=True)allow bounded repair
client.session(name)keep context across a sequence of operations