daimon-client
Python client for Daimon — a pluggable AI sidecar runtime.
Installation
pip install daimon-client
Quick start
from daimon_client import Client
with Client(base_url="http://localhost:3500") as c:
# Single LLM configured — no name needed
reply = c.llm().chat("What is a daimon?")
print(reply)
# Multiple LLMs configured — pick by name
reply = c.llm("claude").chat("What is a daimon?")
Async
import asyncio
from daimon_client import AsyncClient
async def main():
async with AsyncClient(base_url="http://localhost:3500") as c:
reply = await c.llm().chat("What is a daimon?")
print(reply)
asyncio.run(main())
Streaming
with Client() as c:
for text in c.llm().stream("Tell me a story."):
print(text, end="", flush=True)
Multi-turn conversations
Pass a list of messages to carry history yourself:
reply = c.llm().chat([
{"role": "user", "content": "My name is Alice."},
{"role": "assistant", "content": "Nice to meet you, Alice!"},
{"role": "user", "content": "What is my name?"},
])
Sessions
Let the sidecar maintain history server-side with a session_id:
llm = c.llm()
llm.chat("My favourite colour is blue.", session_id="chat-1")
reply = llm.chat("What is my favourite colour?", session_id="chat-1")
# reply contains "blue"
llm.clear_session("chat-1")
Inference parameters
All sampling parameters are optional and fall back to the component's configured defaults:
reply = c.llm("gpt4o").chat("Summarise this.", model="gpt-4o", temperature=0.2, max_tokens=256)
Vector store (memory)
Read and write documents in a configured vector store:
mem = c.memory("my-store")
# Upsert a document (returns the assigned ID)
doc_id = mem.upsert("The Eiffel Tower is 330 metres tall.", id="eiffel", metadata={"source": "wikipedia"})
# Semantic search
results = mem.query("tall Paris structures", top_k=3)
for r in results:
print(f"{r.score:.3f} {r.content}")
# Delete
mem.delete("eiffel")
Async vector store
async with AsyncClient() as c:
mem = c.memory("my-store")
await mem.upsert("Some content")
results = await mem.query("my query")
Graph store
Interact with a configured graph database using Cypher:
kg = c.graph("knowledge-graph")
# Add nodes
kg.add_node(id="alice", labels=["Person"], props={"name": "Alice", "age": 30})
kg.add_node(id="bob", labels=["Person"], props={"name": "Bob"})
# Add a relationship
kg.add_edge("alice", "bob", "KNOWS", props={"since": "2020"})
# Run a Cypher query
rows = kg.cypher(
"MATCH (a:Person)-[:KNOWS]->(b) RETURN a.name AS from, b.name AS to"
)
print(rows) # [{"from": "Alice", "to": "Bob"}]
# Delete a node (and all its relationships)
kg.delete_node("alice")
API reference
Client(base_url?, timeout?)
| Parameter | Default |
|---|---|
base_url |
http://127.0.0.1:3500 |
timeout |
120.0 seconds |
Use as a context manager (with Client() as c) or call c.close() manually.
c.llm(component="default") → LLMClient
Returns a client scoped to the named LLM component. Omit component to use whichever single LLM is configured.
| Method | Description |
|---|---|
chat(prompt, **kwargs) → str |
Send and return the full text response. |
stream(prompt, **kwargs) → Iterator[str] |
Yield text fragments as they arrive. |
converse(*, messages, **kwargs) → Iterator[Chunk] |
Raw chunk stream for full control. |
clear_session(session_id) |
Delete server-side session history. |
prompt can be a str or a list of {"role": ..., "content": ...} dicts.
Shorthand methods on Client
c.chat(component, prompt, **kwargs), c.stream(...), c.converse(...), and c.clear_session(...) are convenience wrappers that call c.llm(component).*. They exist for quick scripts; prefer the llm() accessor for anything beyond a one-liner.
AsyncClient exposes the same API with async def methods and AsyncLLMClient via c.llm().
c.memory(store="default") → MemoryStoreClient
Returns a client scoped to the named vector store.
| Method | Description |
|---|---|
upsert(content, *, id?, metadata?) |
Insert or update a document. Returns the document ID. |
query(query, top_k=5) |
Semantic search. Returns list[MemoryResult] sorted by descending score. |
delete(id) |
Delete a document by ID. |
c.graph(store) → GraphStoreClient
Returns a client scoped to the named graph store.
| Method | Description |
|---|---|
add_node(*, id?, labels?, props?) |
Add or update a node. Returns the node ID. |
add_edge(from_id, to_id, rel_type, *, props?) |
Create a directed relationship. |
cypher(query, params?) |
Run a Cypher query. Returns list[dict]. |
delete_node(id) |
Delete a node and all its relationships. |
Keyword arguments for chat / stream
| Argument | Description |
|---|---|
model |
Override the component's default model |
system |
System prompt shorthand |
max_tokens |
|
temperature |
|
top_p |
|
top_k |
Anthropic only |
stop |
List of stop sequences |
frequency_penalty |
|
presence_penalty |
|
seed |
|
session_id |
Server-side session ID |
AsyncClient mirrors Client with async def methods and async for streaming.
Links
License
Apache-2.0
Metadata
Release files for daimon-client 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| daimon_client-0.5.0.tar.gz | 15.6 kB | With provenance | Details for daimon_client-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| daimon_client-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for daimon_client-0.5.0-py3-none-any.whl |
Total release size: 28.0 kB
Release files / daimon_client-0.5.0.tar.gz
| Download URL | daimon_client-0.5.0.tar.gz |
|---|---|
| Size | 15.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef620b08ade9c6a18abc8c36438b93af3b77c2355f026928ad1884dceee884bd
|
|
BLAKE2b-256 checksum How to use checksums |
c07ab14656cd35a33f58c0ddee01ce5a38bdde647c60fbc856a3369abf4d97a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.
Transparency logRelease files / daimon_client-0.5.0-py3-none-any.whl
| Download URL | daimon_client-0.5.0-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
77d8cf482ee2da5959d119416b2657da7d20d89c532f0f89709220c3539c6f87
|
|
BLAKE2b-256 checksum How to use checksums |
f1d1bf86ec3f7cd3f28649a7318d73f6c7851e60318b15475a3bc9852c229bc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.
Transparency logSecurity for daimon-client 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for daimon_client-0.5.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.