A modular, observable AI agent framework
Project description
axis-core
A modular, observable AI agent framework for building production-ready agents in Python.
Highlights
- Lifecycle execution engine: Initialize -> Observe -> Plan -> Act -> Evaluate -> Finalize
- Pluggable adapters for models, memory, planners, and telemetry
- Built-in model fallback for recoverable provider errors
- Tool system with
@tool, schema generation, and destructive-action confirmation hooks - Runtime policy enforcement (timeouts, retries, rate limits, cache)
- Checkpoint/resume support for phase-boundary recovery
- Budget controls for cost, token, and cycle limits
- Type hints with strict mypy coverage
Installation
# Core package
pip install axis-core
# Provider and adapter extras
pip install axis-core[anthropic]
pip install axis-core[openai]
pip install axis-core[openrouter]
pip install axis-core[redis]
pip install axis-core[sqlite]
# Everything
pip install axis-core[full]
Requires Python 3.10+.
Quick Start
import asyncio
from axis_core import Agent, Budget, tool
@tool
def get_weather(city: str) -> str:
return f"Weather in {city}: Sunny, 72F"
async def main() -> None:
agent = Agent(
tools=[get_weather],
model="claude-sonnet-4-20250514",
fallback=["gpt-4o"],
planner="sequential",
budget=Budget(max_cost_usd=0.50),
system="You are a concise assistant.",
)
result = await agent.run_async("What is the weather in Tokyo?")
print(result.output)
print(result.stats)
asyncio.run(main())
Streaming
for event in agent.stream("Solve 42 * 137"):
if event.is_token:
print(event.token, end="", flush=True)
elif event.is_final:
print("\nDone")
Documentation
- Getting Started
- Examples
- Tools Guide
- Models Guide
- Runtime Operations
- Budget and Limits
- Agent Reference
- Config Reference
- Errors Reference
- Environment Variables
- Contributing
Supported Providers
| Provider | Installation | Notes |
|---|---|---|
| Anthropic | pip install axis-core[anthropic] |
Claude models via Anthropic adapter |
| OpenAI | pip install axis-core[openai] |
Chat Completions + Responses routing |
| OpenRouter | pip install axis-core[openrouter] |
OpenAI-compatible base URL path |
For OpenRouter:
OPENAI_API_KEY=<openrouter-api-key>
OPENAI_BASE_URL=https://openrouter.ai/api/v1
Status
v0.8.0b (Beta pre-release)
- Beta means APIs are stabilizing, but breaking changes are still possible before
1.0.0. - See CHANGELOG.md for release notes.
Roadmap
Planned (Committed)
- Semantic memory search capabilities
- Memory adapter URL-style resolution
- Preconfigured loadouts (
research_agent,support_agent,code_agent) - Planner fallback and plan confidence scoring
Exploring (Not Committed)
- Additional provider integrations
- Deeper model-specific optimizations
- Extended developer tooling and enterprise workflow support
Development
pip install -e ".[dev,anthropic,openai]"
pytest
ruff check axis_core tests --fix
mypy axis_core --strict
For full contributor workflow and quality gates, see CONTRIBUTING.md.
License
Apache License 2.0. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
axis_core-0.8.0b0.tar.gz
(197.4 kB
view details)
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
axis_core-0.8.0b0-py3-none-any.whl
(125.3 kB
view details)
File details
Details for the file axis_core-0.8.0b0.tar.gz.
File metadata
- Download URL: axis_core-0.8.0b0.tar.gz
- Upload date:
- Size: 197.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9c3a04d3562d95639fef0a3ee24f7e9fdbbab0731efebdab906e12aa75cb184
|
|
| MD5 |
d9b51335d5ba5f29191d4f6956793f81
|
|
| BLAKE2b-256 |
85187cc221e1d291053a6953ee860d0443592721f5cc08ef52597a7600204515
|
File details
Details for the file axis_core-0.8.0b0-py3-none-any.whl.
File metadata
- Download URL: axis_core-0.8.0b0-py3-none-any.whl
- Upload date:
- Size: 125.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2a579653e90939c5191ad53fe3798679cb6cbeb43dec02b0cd1d89282e2d92a
|
|
| MD5 |
afbe9580623f5d60e4f6cf3a166952ef
|
|
| BLAKE2b-256 |
28c3cad88a823dadb4282e4a3c5a36e64de476bd92629b5d37f2dac1e1e896fe
|