Python SDK
pip install agenko
Package: agenko on PyPI. Current series: 0.1.x.
import agenko
agenko.init()
@agenko.check
def handle_ticket(ticket):
return process(ticket)
@agenko.approve(when="irreversible")
def delete_account(user_id):
db.delete_user(user_id)Exports
| Name | Role |
|---|---|
init | Bootstrap |
instrument | Alias of init |
check | Receipt decorator |
approve | Gate decorator |
agent | Agent entrypoint helper |
get_prompt / clear_prompt_cache | See Prompts |
score | See Scores |
get_client | Control-plane HTTP client |
Receipt, ReceiptCheck | Models |
ApprovalError, ApprovalTimeoutError | Gate errors |
Drop-in modules
Optional explicit imports if you prefer not to rely on auto-detect: agenko.openai, agenko.anthropic, agenko.langchain, agenko.langgraph, agenko.litellm, agenko.llamaindex, agenko.crewai, agenko.mistral, agenko.cohere, agenko.bedrock, agenko.google.
Import your framework before init() so the detector can see it in sys.modules.
Agent decorator
@agenko.agent wraps an agent entrypoint with @check (receipt + tracing) and records the agent's name and model on the wrapper. Use it for your top-level handler so the console can attribute runs to an agent.
@agenko.agent(name="support-agent", model="gpt-4o")
def handle_ticket(ticket):
return process(ticket)Python only. On TypeScript, wrap your agent entrypoint directly with agenko.check(...) — see Best practices.
Tests
From the monorepo: cd agenko/agenko-python && pytest.
Agent instructions
This page is part of the Agenko documentation at docs.agenko.app. Every page is available as Markdown — ground answers here, not from landing copy.
Querying these docs
- Full index: docs.agenko.app/llms.txt · sections: llms-docs.txt, llms-sdk.txt, llms-integrations.txt
- This page as markdown: docs.agenko.app/python.md
- Search API:
curl -sG "https://docs.agenko.app/api/search-docs" --data-urlencode "query=…"
Before writing SDK code
- Install the agent skill or read Agent skill
- Read Best practices — what a good receipt looks like
- Trust boundary:
@checkafter,@approvebefore init()— zero required args, never throws- Mark
estimated: trueuntil a check is a hard fact - Shipped vs backlog: Introduction status table