Catalog PyPI
Back to packageRELEASE DETAILS

1.0.0

PyPI

agentcc

Python SDK for the AgentCC LLM Gateway — OpenAI-compatible, type-safe, with guardrails and observability

agentccgatewayguardrailsllmopenaiproxy
Published22 Apr 2026
Direct dependencies15
Transitive dependenciesNot calculated

README

Version 1.0.0 documentation

agentcc

Python SDK for the AgentCC gateway — OpenAI-compatible, typed, with first-class streaming, tools, structured output, guardrails, and cost tracking.

Install

pip install agentcc

Python 3.9+ required.

Usage

Basic chat completion

import os
from agentcc import AgentCC

client = AgentCC(
    api_key=os.environ["AGENTCC_API_KEY"],
    base_url="https://gateway.futureagi.com/v1",
)

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Summarize the theory of relativity."}],
)
print(response.choices[0].message.content)

The AgentCC client reads AGENTCC_API_KEY and AGENTCC_BASE_URL from the environment when those parameters are not passed explicitly.

Streaming

# stream=True returns an iterator of ChatCompletionChunk objects
stream = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Write a haiku about programming."}],
    stream=True,
)
for chunk in stream:
    delta = chunk.choices[0].delta
    if delta.content:
        print(delta.content, end="", flush=True)

# Alternatively, use the stream() context manager for convenience helpers
with client.chat.completions.stream(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Write a haiku about programming."}],
) as s:
    for text in s.text_stream:
        print(text, end="", flush=True)
    print(f"\n[{s.get_final_completion().usage.total_tokens} tokens]")

Tool calling

import json

tools = [
    {
        "type": "function",
        "function": {
            "name": "get_weather",
            "description": "Get the current weather for a location.",
            "parameters": {
                "type": "object",
                "properties": {
                    "location": {"type": "string"},
                    "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]},
                },
                "required": ["location"],
            },
        },
    }
]

messages = [{"role": "user", "content": "What's the weather in Paris?"}]
response = client.chat.completions.create(model="gpt-4o", messages=messages, tools=tools)

if response.choices[0].message.tool_calls:
    for tc in response.choices[0].message.tool_calls:
        args = json.loads(tc.function.arguments)
        # call your function, then send the result back as a tool message

Async client

import asyncio
from agentcc import AsyncAgentCC

async def main():
    client = AsyncAgentCC(
        api_key=os.environ["AGENTCC_API_KEY"],
        base_url="https://gateway.futureagi.com/v1",
    )
    response = await client.chat.completions.create(
        model="gpt-4o",
        messages=[{"role": "user", "content": "Hello!"}],
    )
    print(response.choices[0].message.content)
    await client.close()

asyncio.run(main())

API surface

ResourceAccess path
Chat completionsclient.chat.completions
Legacy completionsclient.completions
Embeddingsclient.embeddings
Imagesclient.images
Audioclient.audio
Modelsclient.models
Moderationsclient.moderations
Filesclient.files
Batchesclient.batches
Rerankclient.rerank
Responsesclient.responses

Environment variables

VariableDescription
AGENTCC_API_KEYAPI key (sk-agentcc-*)
AGENTCC_BASE_URLGateway base URL (e.g. https://gateway.futureagi.com/v1)

Documentation

https://docs.futureagi.com

License

Apache 2.0 — see LICENSE.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 31

Native requirements
15 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
anyio
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
anyio<5.0,>=4.0runtime
httpx
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
httpx<1.0,>=0.25.0runtime
pydantic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
pydantic<3.0,>=2.0runtime
typing-extensions
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
typing-extensions>=4.7runtime
jsonschema
Environment
{
  "extras": "",
  "marker": "extra == \"all\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
jsonschema>=4.0; extra == "all"runtime
langchain-core
Environment
{
  "extras": "",
  "marker": "extra == \"all\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
langchain-core>=0.1; extra == "all"runtime
llama-index-core
Environment
{
  "extras": "",
  "marker": "extra == \"all\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
llama-index-core>=0.10; extra == "all"runtime
opentelemetry-api
Environment
{
  "extras": "",
  "marker": "extra == \"all\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
opentelemetry-api>=1.0; extra == "all"runtime
opentelemetry-sdk
Environment
{
  "extras": "",
  "marker": "extra == \"all\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
opentelemetry-sdk>=1.0; extra == "all"runtime
pytest-asyncio
Environment
{
  "extras": "",
  "marker": "extra == \"all\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
pytest-asyncio>=0.23; extra == "all"runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"all\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
pytest>=7.0; extra == "all"runtime
respx
Environment
{
  "extras": "",
  "marker": "extra == \"all\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
respx>=0.21; extra == "all"runtime
tiktoken
Environment
{
  "extras": "",
  "marker": "extra == \"all\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
tiktoken>=0.5; extra == "all"runtime
jsonschema
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
jsonschema>=4.0; extra == "dev"runtime
mypy
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
mypy>=1.8; extra == "dev"runtime
opentelemetry-api
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
opentelemetry-api>=1.0; extra == "dev"runtime
opentelemetry-sdk
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
opentelemetry-sdk>=1.0; extra == "dev"runtime
pytest-asyncio
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
pytest-asyncio>=0.23; extra == "dev"runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
pytest>=7.0; extra == "dev"runtime
respx
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
respx>=0.21; extra == "dev"runtime
ruff
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
ruff>=0.3; extra == "dev"runtime
tiktoken
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
tiktoken>=0.5; extra == "dev"runtime
langchain-core
Environment
{
  "extras": "",
  "marker": "extra == \"langchain\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
langchain-core>=0.1; extra == "langchain"runtime
llama-index-core
Environment
{
  "extras": "",
  "marker": "extra == \"llamaindex\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
llama-index-core>=0.10; extra == "llamaindex"runtime
opentelemetry-api
Environment
{
  "extras": "",
  "marker": "extra == \"otel\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
opentelemetry-api>=1.0; extra == "otel"runtime
opentelemetry-sdk
Environment
{
  "extras": "",
  "marker": "extra == \"otel\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
opentelemetry-sdk>=1.0; extra == "otel"runtime
pytest-asyncio
Environment
{
  "extras": "",
  "marker": "extra == \"testing\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
pytest-asyncio>=0.23; extra == "testing"runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"testing\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
pytest>=7.0; extra == "testing"runtime
respx
Environment
{
  "extras": "",
  "marker": "extra == \"testing\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
respx>=0.21; extra == "testing"runtime
tiktoken
Environment
{
  "extras": "",
  "marker": "extra == \"tiktoken\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
tiktoken>=0.5; extra == "tiktoken"runtime
jsonschema
Environment
{
  "extras": "",
  "marker": "extra == \"validation\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
jsonschema>=4.0; extra == "validation"runtime

Distribution files

2 collected
agentcc-1.0.0-py3-none-any.whl

bdist_wheel · 89.08 KB · Python py3

Source file
agentcc-1.0.0.tar.gz

sdist · 131.79 KB · Python source

Source file

Repository

PENDING
future-agi/agent-command-center

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:37 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:ca5455e6117127ba5df06a5d0bf4d34b652eadf752b8afdce7fa2b34b6bfec27

Other collected versions

View all collected versions →