Skip to main content

agentics-you — Python SDK

The Python SDK for Agentics: shared memory for AI agents, with a receipt for every write. The same package carries the receipt helpers, the gateway client and the agentics CLI.

Install

pip install agentics-you

agentics-you on PyPI

pip install "agentics-you[openai]"    # + OpenAI Agents SDK trace processor (agentics_you.openai_agents)
pip install "agentics-you[litellm]"   # + LiteLLM callback (agentics_you.litellm_callback)
pip install "agentics-you[tasks]"     # + task marketplace client (agentics_you.tasks, which needs httpx)

agentics --version prints the installed version.

The task client is a separate install. agentics_you.tasks needs httpx, which the base package does not include.

pip install "agentics-you[tasks]"
from agentics_you.tasks import AgenticsTasks

The import name is agentics_you. agentics on PyPI belongs to another publisher.

Quickstart

from agentics_you import AgenticsClient
client = AgenticsClient()  # reads AGENTICS_API_KEY
client.memories.add("Dana prefers aisle seats.", wait=True)

Memory in more detail

Create an org API key (ak_...) in the console under API Keys.

export AGENTICS_API_KEY=ak_...
export AGENTICS_AGENT=...   # optional: agent identity token, so writes are attributed to that agent
from agentics_you import AgenticsClient

client = AgenticsClient()

# Write. The API queues an ingest job; wait=True returns once the memory is indexed.
r = client.memories.add("Dana prefers aisle seats on flights over two hours.",
                        metadata={"topic": "travel"}, wait=True)

# Recall. Each hit carries score, why and receipt_hash.
hits = client.memories.search("Which seat does Dana want?", k=5)["hits"]

client.memories.get(r["memory_id"])
client.memories.list(limit=20)
client.memories.delete(r["memory_id"])
Resource Methods Route
client.memories add, search, list, get, delete, export /v1/memories, /v1/memories/search, /v1/memories/export
client.namespaces list, create, get, rename, delete /v1/namespaces
client.ingest get, list, retry, wait /v1/ingest, /v1/ingest/{job_id}

AsyncAgenticsClient has the same methods as coroutines. Errors are typed by status: ValidationError (400/413/422), AuthenticationError (401), PermissionDeniedError (403), NotFoundError (404), ConflictError (409), RateLimitError (429), ServerError (5xx), all subclasses of AgenticsError with code, status and details. Network errors, timeouts, 429, 502, 503 and 504 are retried with backoff (max_retries, default 2), honouring Retry-After. AGENTICS_BASE_URL points the client at another deployment. Stdlib only, Python 3.9+.

Receipts (decorator)

from agentics_you import Network

net = Network(api_key="ak_...")

@net.task(
    agent_id="support-bot",
    foundation_model="anthropic/claude-opus-4-6",
    scope=["read:tickets", "write:reply"],
)
def handle_ticket(ticket_id: str) -> str:
    # your agent logic
    return "Thanks for reaching out!"

reply = handle_ticket("abc-123")
# A receipt was recorded.

Receipts (context manager)

from agentics_you import Agentics

agentics = Agentics(api_key="ak_...")

with agentics.track(
    agent_id="support-bot",
    foundation_model="anthropic/claude-opus-4-6",
    model_version="2026-04-22",
    scope=["read:tickets", "write:reply"],
) as task:
    reply = run_my_agent(...)
    task.set_outputs(reply)
    task.set_outcome("success")

Gateway — drop-in OpenAI-compatible client

Change one base_url and keep your existing OpenAI/Anthropic SDK. Every call is routed, budgeted, guardrailed, and lands a cryptographically verifiable receipt on the trust-ledger — written server-side by Proof Mesh (the SDK never hashes, signs, or sets billable).

from openai import OpenAI                  # your existing SDK, unchanged
from agentics_you import createHeaders

client = OpenAI(
    base_url="https://agentics.you/api/v1",   # the only change
    api_key="ak_...",                              # your Agentics gateway key
    default_headers=createHeaders(user="alice@acme.com",
                                  metadata={"cost_center": "support"}),
)
resp = client.chat.completions.create(
    model="@anthropic/claude-opus-4-8",
    messages=[{"role": "user", "content": "hi"}],
)

Or use the self-contained client (stdlib only, no openai needed):

from agentics_you import AgenticsGateway

gw = AgenticsGateway(base_url="https://agentics.you/api/v1", api_key="ak_...")
resp = gw.with_options(user="alice@acme.com").chat.completions.create(
    model="@anthropic/claude-opus-4-8",
    messages=[{"role": "user", "content": "hi"}],
)

# Auto-instrument CrewAI / LangGraph, or attach LangChain/LlamaIndex handlers:
from agentics_you import LangchainCallbackHandler
chain.invoke(x, config={"callbacks": [LangchainCallbackHandler(user="alice@acme.com")]})

# Browse the Model Garden catalog:
gw.list_models(provider="anthropic")

createHeaders() emits the frozen x-agentics-{trace-id,span-id,user,meta,debug} header set; these become the parent receipt's identity fields, so per-user attribution and provable savings start at your call site. Full quickstart: https://agentics.you/docs/sdk/python.html.

Authentication

The SDK looks for an API key in this order:

  1. api_key= constructor argument
  2. AGENTICS_API_KEY environment variable
  3. ~/.agentics/credentials (set by agentics login --api-key ak_...)

Issue API keys from the dashboard at https://agentics.you/dashboard/api-keys.

CLI

# Save credentials
agentics login --api-key ak_...

# Register / update an agent from a manifest
cat > agentics.json <<EOF
{
  "display_name": "Support Bot",
  "handle": "support-bot",
  "foundation_model": "anthropic/claude-opus-4-6",
  "scope_array": ["read:tickets", "write:reply"],
  "description": "Handles tier-1 support tickets"
}
EOF
agentics deploy

# Or override fields inline
agentics deploy --name "Support Bot" --model anthropic/claude-opus-4-6 \\
                --scope "read:tickets,write:reply"

# Inspect your account
agentics whoami
agentics agents

# Gateway devex verbs
agentics gateway test --url https://agentics.you/api/v1 --user alice@acme.com
agentics config validate gateway-config.json
agentics config publish  gateway-config.json --name default
agentics prompt push     support-greeting.json
agentics log tail --limit 5            # gateway receipts with their trace_id
agentics proof verify    <receipt_hash>  # 4-step end-to-end verify
agentics proof bundle    <receipt_hash>  # offline-verifiable evidence bundle
agentics models --provider anthropic

Publishing (for maintainers)

Published from sdks/python/ to PyPI as agentics-you by .github/workflows/pypi-publish.yml, with PyPI Trusted Publishing (OIDC, no token on this repo). This tree is 1.2.2. The release tag publishes it; this change does not.

# Bump version in pyproject.toml and agentics_you/version.py, then tag sdk-py-v<semver>.
git tag sdk-py-v1.2.2
git push origin sdk-py-v1.2.2

The action runs the unit tests, writes the tag's version into both version files, builds the sdist and wheel, runs twine check, and publishes. Trusted publishing for this repo is already set at https://pypi.org/manage/account/publishing/ (workflow pypi-publish.yml, environment pypi).

Apache-2.0

Metadata

Release files for agentics-you 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentics-you 1.2.2
File Size Uploaded Provenance Actions
agentics_you-1.2.2.tar.gz 32.7 kB Without provenance Details for agentics_you-1.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agentics-you 1.2.2
File Interpreter ABI Platform Actions
agentics_you-1.2.2-py3-none-any.whl Python 3 none any Details for agentics_you-1.2.2-py3-none-any.whl

Total release size: 66.5 kB

Release files / agentics_you-1.2.2.tar.gz

Download URL agentics_you-1.2.2.tar.gz
Size 32.7 kB
Tags Source
SHA-256 checksum
How to use checksums
dca91fe9ded5600a287225f37765c878d81afa26b1a56eaff6be172d5800b960
BLAKE2b-256 checksum
How to use checksums
735de2eef22290f03a62dba039a16d1ca193fbef5f39eb3723b93daf91879acd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / agentics_you-1.2.2-py3-none-any.whl

Download URL agentics_you-1.2.2-py3-none-any.whl
Size 33.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e67050b39a74722a04abfff4df4b4b5f5a061ecdcf4d27280456605d8a7a7a0
BLAKE2b-256 checksum
How to use checksums
02a923783e6d41fdb6d079b901762fc70c333931f961f11535ec885d58f6110b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for agentics-you 1.2.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page