Skip to main content

agents24

Last Updated: 2026-06-21

Unified Python SDK for Agents24.

Endpoint methods are generated from packages/agents24-sdk-contract/agents24.sdk.json. Do not edit files under agents24/generated/ directly. For SDK maintenance, see docs/references/agents24_sdk_development_guide.md.

from agents24 import Agents24

client = Agents24(
    base_url="http://localhost:8000",
    api_key="tpk_...",
    organization_id="org-id",
    project_id="project-id",
)

agent = client.agent({
    "name": "Support Agent",
    "instructions": "Answer briefly.",
}).create()

client.agents.publish(agent["id"])

Published-Agent Runtime

Use client.embed from server code to call a published agent through the public embed runtime:

def on_event(event):
    print(event["event"])

result = client.embed.stream_agent(
    "published-agent-id",
    {
        "input": "Help me with my account.",
        "external_user_id": "customer-user-123",
    },
    on_event=on_event,
)

The namespace also includes thread detail/delete, run-context, cancel, and attachment-upload methods.

Thread history can be listed for one agent or across several agents:

threads = client.embed.list_agent_threads(
    "published-agent-id",
    external_user_id="customer-user-123",
)

sidebar_threads = client.embed.list_agent_threads_multi({
    "agent_ids": ["agent-a", "agent-b"],
    "external_user_id": "customer-user-123",
})

Async backends can use AsyncAgents24.embed.list_agent_threads_multi(agent_ids, external_user_id=...).

Artifact Authoring

Artifact code imports lightweight helpers from agents24.artifacts:

from pydantic import BaseModel, Field

from agents24.artifacts import tool


class EchoInput(BaseModel):
    text: str = Field(description="Text to echo.")


class EchoOutput(BaseModel):
    text: str


@tool(
    name="echo",
    input_schema=EchoInput,
    output_schema=EchoOutput,
)
async def echo(input, config, context):
    return {"text": input["text"]}

The agents24.artifacts module is transport-free and safe for artifact runtime code. If artifact code imports Pydantic, declare pydantic as an artifact dependency.

Development

pnpm run generate:sdk
pnpm run check:sdk-contract
pnpm run test:agents24-python

Generated endpoint methods must stay in parity with the TypeScript @agents24/sdk package.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agents24-0.1.3.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agents24-0.1.3-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file agents24-0.1.3.tar.gz.

File metadata

  • Download URL: agents24-0.1.3.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agents24-0.1.3.tar.gz
Algorithm Hash digest
SHA256 cd23185a4a225366fb4c009e453261b8fa65307ece3f4ca0393911a459f3816f
MD5 141002396684ac6d24e0d05435636930
BLAKE2b-256 0afb129a00fbbd03d8fdf83b9bbb3817a28a80d40117356908d5e9224dab24ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for agents24-0.1.3.tar.gz:

Publisher: agents24-sdk-release.yml on daniel5426/talmudpedia

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agents24-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: agents24-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agents24-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6cb98d1d5786da5f88dc208b8f909499fdef9d88af074895982ac213837f33ba
MD5 fc173741487f4cded971e4b330a510ef
BLAKE2b-256 c86e70863466eb017c35c1cc92fc8215644874f1dec6a27345da5d73847ddd2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for agents24-0.1.3-py3-none-any.whl:

Publisher: agents24-sdk-release.yml on daniel5426/talmudpedia

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page