Docs menu

Python SDK

pip install agenko

Package: agenko on PyPI. Current series: 0.1.x.

python
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

NameRole
initBootstrap
instrumentAlias of init
checkReceipt decorator
approveGate decorator
agentAgent entrypoint helper
get_prompt / clear_prompt_cacheSee Prompts
scoreSee Scores
get_clientControl-plane HTTP client
Receipt, ReceiptCheckModels
ApprovalError, ApprovalTimeoutErrorGate 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.

python
@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

Before writing SDK code

  • Install the agent skill or read Agent skill
  • Read Best practices — what a good receipt looks like
  • Trust boundary: @check after, @approve before
  • init() — zero required args, never throws
  • Mark estimated: true until a check is a hard fact
  • Shipped vs backlog: Introduction status table

Page: Python SDK
HTML: https://docs.agenko.app/python
Markdown: https://docs.agenko.app/python.md