This release is a pre-release and may not be stable for production use.
agentic
The agent/knowledge/orchestration/workflow engine that powers the Powabase stack — a well-documented Python library you can also import on its own.
Features
- Agent: Single LLM-powered agent with a clean run() interface
- Session Management: Built-in conversation history tracking
- Multi-Model Support: Uses litellm for 100+ LLM providers
- Type-Safe: Full type hints and dataclass-based outputs
- Orchestration: Multi-agent coordination (sequential, supervisor, router, parallel)
- Workflow: Multi-step pipelines with conditional logic, loops, and a sandboxed code-execution block
Installation
Published on PyPI as powabase-agentic; the import module is agentic
(same split as scikit-learn → import sklearn).
# Using pip
pip install powabase-agentic
# Using uv
uv add powabase-agentic
# From source
git clone https://github.com/powabase-ai/agentic.git
cd agentic
pip install -e .
Optional extras: pip install "powabase-agentic[rerankers]" adds local
cross-encoder reranking models.
Quick Start
from agentic import Agent
# Create an agent
agent = Agent(
model="gpt-4o-mini",
system_prompt="You are a helpful assistant.",
)
# Run the agent
output = agent.run("What is 2+2?")
print(output.content) # "2 + 2 equals 4."
# Check execution details
print(output.status) # ExecutionStatus.COMPLETED
print(output.usage) # {"prompt_tokens": 15, "completion_tokens": 8, ...}
Multi-Turn Conversations
Use AgentSession to maintain conversation history:
from agentic import Agent, AgentSession
agent = Agent(
model="gpt-4o-mini",
system_prompt="You are a helpful assistant.",
)
# Create a session
session = AgentSession()
# First turn
output1 = agent.run("My name is Alice", session=session)
session.add_output(output1)
# Second turn - agent remembers the name
output2 = agent.run("What's my name?", session=session)
session.add_output(output2)
print(output2.content) # "Your name is Alice."
# Get conversation history
messages = session.get_messages()
Async Support
import asyncio
from agentic import Agent
async def main():
agent = Agent(model="gpt-4o-mini", system_prompt="You are helpful.")
output = await agent.arun("Hello!")
print(output.content)
asyncio.run(main())
Model Selection
agentic uses litellm under the hood, supporting 100+ LLM providers:
# OpenAI
agent = Agent(model="gpt-4o")
# Anthropic
agent = Agent(model="claude-3-opus-20240229")
# Azure OpenAI
agent = Agent(model="azure/my-deployment")
# Local models (Ollama)
agent = Agent(model="ollama/llama2")
Set up API keys via environment variables:
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
Core Concepts
Agent
An Agent wraps an LLM with a system prompt. It provides a simple run() method that handles message formatting, LLM calls, and response parsing.
AgentOutput
The result of agent.run(). Contains:
content: The LLM's response textstatus: Execution status (COMPLETED, FAILED, etc.)messages: All messages exchangedusage: Token usage statistics- Timing information (
started_at,completed_at)
AgentSession
Container for conversation history. Pass a session to run() to include previous messages in the context.
ExecutionContext
Runtime context carrying execution_id, session_id, and custom metadata. Created automatically or can be provided explicitly.
See docs/CONCEPTS.md for detailed documentation.
Project Structure
agentic/src/agentic/
├── agent/ # Agent implementation
│ ├── agent.py # Agent class
│ ├── output.py # AgentOutput dataclass
│ └── session.py # AgentSession for history
├── orchestration/ # Multi-agent coordination (sequential, supervisor, router, parallel)
├── workflow/ # Pipeline execution (blocks, conditions, sandboxed functions)
└── execution/ # Shared infrastructure
├── context.py # ExecutionContext
├── status.py # ExecutionStatus enum
└── base.py # BaseOutput class
Development
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Type checking
mypy src/agentic
License
Apache-2.0 — see LICENSE.
Contributing
Contributions are welcome! Please read our contributing guidelines and submit a pull request.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file powabase_agentic-0.1.0rc3.tar.gz.
File metadata
- Download URL: powabase_agentic-0.1.0rc3.tar.gz
- Upload date:
- Size: 481.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b7ccc6e670b6f92d3f5aefe7586ce155dbff8cf7be579fbd54a1ec2fa04eacd
|
|
| MD5 |
cb5d78baf8790a72e42ff4300d5a9bde
|
|
| BLAKE2b-256 |
c1656a72eddd8eb321e3f31a0b7ecd03cc36cb8e652fef30bb25b7588208dcad
|
Provenance
The following attestation bundles were made for powabase_agentic-0.1.0rc3.tar.gz:
Publisher:
publish.yml on powabase-ai/agentic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
powabase_agentic-0.1.0rc3.tar.gz -
Subject digest:
0b7ccc6e670b6f92d3f5aefe7586ce155dbff8cf7be579fbd54a1ec2fa04eacd - Sigstore transparency entry: 2306462149
- Sigstore integration time:
-
Permalink:
powabase-ai/agentic@7cf78b419a74b1a09ac95799172381d457956e55 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/powabase-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7cf78b419a74b1a09ac95799172381d457956e55 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file powabase_agentic-0.1.0rc3-py3-none-any.whl.
File metadata
- Download URL: powabase_agentic-0.1.0rc3-py3-none-any.whl
- Upload date:
- Size: 254.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e50ee5157a119c1c969d53b5f3d6dce796797511085b43b0d9469eceb252c3f4
|
|
| MD5 |
b35743932494103147e0002574586f7c
|
|
| BLAKE2b-256 |
af37265cbb66f40562d6ad8a41d56edab7ab80f8270168f7b8999f04e67da4a5
|
Provenance
The following attestation bundles were made for powabase_agentic-0.1.0rc3-py3-none-any.whl:
Publisher:
publish.yml on powabase-ai/agentic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
powabase_agentic-0.1.0rc3-py3-none-any.whl -
Subject digest:
e50ee5157a119c1c969d53b5f3d6dce796797511085b43b0d9469eceb252c3f4 - Sigstore transparency entry: 2306462187
- Sigstore integration time:
-
Permalink:
powabase-ai/agentic@7cf78b419a74b1a09ac95799172381d457956e55 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/powabase-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7cf78b419a74b1a09ac95799172381d457956e55 -
Trigger Event:
workflow_dispatch
-
Statement type: