Skip to content

Quickstart

Install

pip install tako-ai-core

The Python import name is tako (import tako); the PyPI distribution is tako-ai-core.

No Rust toolchain is required at install time — wheels are prebuilt for manylinux, musllinux, macOS universal2, and Windows x64/arm64.

Hello world

import asyncio
import os

import tako

async def main() -> None:
    provider = tako.providers.Anthropic(
        model="claude-opus-4-7",
        api_key=os.environ["ANTHROPIC_API_KEY"],
    )
    agent = tako.SingleAgent(provider=provider, max_steps=4)
    result = await agent.run("In one sentence: what is an octopus?")
    print(result.text)

asyncio.run(main())

Synchronous API

Every async method has a _sync sibling:

result = agent.run_sync("Quick question: ...")

The sync sibling releases the GIL while waiting for the response so other Python threads can run.

Without an API key

For local development and tests use the in-process Fake provider:

provider = tako.providers.Fake(canned_text="hello")
agent = tako.SingleAgent(provider=provider)
result = agent.run_sync("anything")
assert result.text == "hello"

Tracing

Process-wide stderr tracing is one call away:

import tako.tracing
tako.tracing.init(filter="tako=debug,info", json=True)

For an OTLP exporter against a real collector:

guard = tako.tracing.init_otlp(
    endpoint="http://otel-collector:4317",
    protocol="grpc",
    resource_attrs={"service.name": "my-agent"},
)
# ... your application ...
tako.tracing.shutdown_otlp()  # flushes pending spans

See Tracing for the full set of tako.* and gen_ai.* semconv attributes emitted by orchestrators, providers, tools, and policy decisions.

What's next

  • Architecture — crate graph + sequence diagrams.
  • Concepts — page-per-feature design surface.
  • Recipes — copy-pasteable end-to-end integrations.