Skip to main content

Header image

Agentica Python SDK

PyPI version License: MIT Discord Twitter

Agentica is a type-safe AI framework that lets LLM agents integrate with your code: functions, classes, live objects, even entire SDKs. Instead of building MCP wrappers or brittle schemas, you pass references directly; the framework enforces your types at runtime, constrains return types, and manages agent lifecycle.

Prerequisites

  • Python ≥ 3.12.0, < 3.14.0
  • uv

Installation

# With uv
uv pip install symbolica-agentica
# With pip
pip install symbolica-agentica

Documentation

The full documentation can be found at docs.symbolica.ai.

Quick Start

There are two ways to use the Agentica framework. You may install the package from PyPI and sign up for an account on the Symbolica Platform to receive $50 in free inference credits. This is the easiest way to get started.

Alternatively if you wish to develop locally or BYOK you may set up and run a local copy of the server.

To use the platform, get an API key from here.

To BYOK follow these instructions

1. Clone and sync the agentica-server (in one terminal):

git clone https://github.com/symbolica-ai/agentica-server
cd agentica-server && uv sync

2. Set up your keys, inference endpoint, and run the server

export INFERENCE_API_KEY=<your-key>
export INFERENCE_ENDPOINT_URL="https://openrouter.ai/api/v1/chat/completions"
# export INFERENCE_ENDPOINT_URL="https://api.openai.com/v1/responses"
# export INFERENCE_ENDPOINT_URL="https://api.anthropic.com/v1/responses"
uv run src/application/main.py \
  --inference-token=$INFERENCE_API_KEY \
  --inference-endpoint $INFERENCE_ENDPOINT_URL

Run the chat demo

The agentica-chat demo lets you chat with your Python REPL using the Agentica framework. You can use natural language to interact with objects, write and run code, and more.

Make the UV project:

uv init agentica-chat
cd agentica-chat

Add agentica as a dependency:

uv add symbolica-agentica

Create main.py:

import asyncio
from agentica import spawn
from agentica.logging import set_default_agent_listener
from agentica.logging.loggers import StreamLogger

set_default_agent_listener(None)

# Define your tools here!
def my_tool(arg: str) -> str:
    """Describe what your tool does."""
    return f"Result for: {arg}"

async def main():
    agent = await spawn(premise="You are a helpful assistant.")

    print("Agent ready! Type 'quit' to exit.\n")

    while True:
        user_input = input("You: ")
        if user_input.lower() == "quit":
            break

        # Stream the agent's response
        stream = StreamLogger()
        with stream:
            result = asyncio.create_task(
                agent.call(str, user_input, my_tool=my_tool)  # Pass your tools here
            )

        async for chunk in stream:
            if chunk.role == "agent":
                print(chunk, end="", flush=True)
        print()

        print(f"Agent: {await result}\n")

if __name__ == "__main__":
    asyncio.run(main())

If you are running on the Symbolica Platform

export AGENTICA_API_KEY=<your-platform-api-key>
uv run python main.py

Or if you are running locally

export S_M_BASE_URL=http://localhost:2345
uv run python main.py

Build from source

If you wish to build symbolica-agentica from source:

git clone https://github.com/symbolica-ai/agentica-python-sdk.git
cd agentica-python-sdk

To make Agentica available in uv venv:

uv sync

To build the wheel:

uv build

Note that symbolica-agentica specifies agentica-internal as a dependency. By default build and install commands take agentica-internal from PyPI.

To use the locally cloned version of symbolica-agentica package in your project:

# to install it without specifying it as a dependency
uv pip install /path/to/agentica-python-sdk
# to add local version as a dependency, your local path will be hardcoded in pyproject.toml!
uv add /path/to/agentica-python-sdk

License

This project is licensed under the MIT License.

Release files for symbolica-agentica 0.4.1

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

Source distribution (sdist)

Source distribution for symbolica-agentica 0.4.1
File Size Uploaded
symbolica_agentica-0.4.1.tar.gz 10.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for symbolica-agentica 0.4.1
File Interpreter ABI Platform
symbolica_agentica-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 MB

Release files / symbolica_agentica-0.4.1.tar.gz

Download URL symbolica_agentica-0.4.1.tar.gz
Size 10.4 MB
Tags Source
SHA-256 checksum
How to use checksums
4d4e1cf552fd5fb68aa5057adcbdf9d1979ccf9da15483eabb590a24f17fecfe
BLAKE2b-256 checksum
How to use checksums
04bc79a48d17b39b3b9b26b121bf99cd8a62ff59a533d60548f348e6db612c2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Release files / symbolica_agentica-0.4.1-py3-none-any.whl

Download URL symbolica_agentica-0.4.1-py3-none-any.whl
Size 110.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4fa2667fe7f602518a854a20eb8b46eeab4c08e36f727cffb68e0d3b20e9ab4c
BLAKE2b-256 checksum
How to use checksums
ef7237c6c0d4660d3c44e742f6ee644b035b73820b31553728eada61b047a15f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

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