Agent-Based Infrastructure Core - Runtime and CLI
Project description
ABI-Core ๐ค
ABI-Core is the foundation for building Agent-Based Infrastructure โ a framework where intelligent agents collaborate through semantic context, policy-driven governance, and modular orchestration.
ABI Swarm is the runtime: a self-building multi-agent system that plans, orchestrates, and creates agents on demand โ governed by policy.
Beta Release โ APIs may change. Feedback welcome.
What Makes ABI Different
Most agent frameworks assume your agents and tools already exist. ABI doesn't.
- The Planner decomposes complex requests into tasks and finds (or creates) the right agents
- The Orchestrator coordinates execution across multiple agents with A2A protocol
- The Builder creates ephemeral agents on demand โ Docker containers that live, execute, and die
- The Guardian enforces security policies via OPA before any agent communicates
- The Semantic Layer connects everything through vector search and MCP tools
If an agent doesn't exist for a task, ABI builds one. If a tool doesn't exist, ABI creates it. All governed by policy.
Quick Start
pip install abi-core-ai
# Create a project
abi-core create project my-system --with-semantic-layer --with-guardian
# Add the swarm (planner + orchestrator + builder + semantic layer + guardian)
abi-core add abi-swarm
# Run
docker compose up -d
Architecture
User Request
โ
โผ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Orchestrator โโโโโโถโ Planner โโโโโโถโ Builder โ
โ โ โ โ โ โ
โ Coordinates โ โ Decomposes โ โ Creates โ
โ workflows โ โ tasks โ โ ephemeral โ
โ โ โ Finds agentsโ โ agents โ
โโโโโโโโฌโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโฌโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Agents โ โ Semantic โ โ Guardian โ
โ โโโโโโถโ Layer โโโโโโถโ Security โ
โ Permanent โ โ โ โ โ
โ or Ephemeralโ โ Agent Cards โ โ OPA Policiesโ
โ โ โ Tool Cards โ โ A2A Auth โ
โ โ โ MCP Tools โ โ Audit Log โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
Core Concepts
AbiCore โ FastAPI-style Agent Runner
from my_agent import MyAgent
from abi_core.agent import AbiCore
agent = AbiCore()
@agent.task(name="step1")
def step1(raw_input):
return {"cleaned": raw_input.strip()}
@agent.task(name="step2", depends_on=["step1"], input_map={"data": "$step1.result"})
def step2(data):
return {"stored": True}
@agent.tool(name="search")
def search(query):
"""Available to the LLM on demand."""
return {"results": []}
@agent.mcp_tool(name="bigquery_search", input_map={"query": "$input.user_query"})
agent.run(MyAgent())
AbiAgent โ Base Class with Heartbeat
from abi_core.agent import AbiAgent
from config import config
class MyAgent(AbiAgent):
def __init__(self):
super().__init__(
agent_name=config.AGENT_NAME,
description=config.AGENT_DESCRIPTION,
llm_config=config.LLM_CONFIG,
tools=[],
system_prompt="You are a helpful agent.",
)
# stream() inherited with SSE heartbeat + checkpointer memory
ToolExecutionGraph โ Deterministic DAG
Tasks registered with @agent.task() are wired into a LangGraph DAG. The LLM never decides execution order โ the graph does. Retry, checkpoint/resume, and $reference resolution between nodes are built in.
ToolCards โ Governed Tool Discovery
{
"tool_name": "query_sales_db",
"description": "Query the sales database",
"access_scope": {
"databases": ["sales_db"],
"tables": ["sales_db.orders", "sales_db.products"],
"permissions": ["read"],
"storage": ["s3://company-data/sales/*"],
"secrets": ["SALES_DB_CONNECTION_STRING"]
},
"checksum": "sha256:...",
"install_key": "tool://query_sales_db@1.0.0"
}
The planner checks access_scope against agent permissions before assigning tools. The guardian validates checksums before execution.
Zombie Container Pattern
Ephemeral agents are cloned from a "zombie" base container. No docker build โ just docker run with env vars. The zombie reads SYSTEM_PROMPT, TOOLS, AGENT_PORT from environment and self-configures as a fully functional A2A agent.
Features
- AbiCore Runner โ
agent = AbiCore()with auto-config import - Decorator API โ
@agent.task(),@agent.tool(),@agent.mcp_tool() - ToolExecutionGraph โ LangGraph DAG for deterministic tool execution
- SSE Heartbeat โ Automatic keepalive for CloudFront/proxy compatibility
- AgentResponse โ Typed responses:
.success(),.error(),.status(),.input_required() - A2AResponse โ Clean wrapper for A2A protocol parsing
- Multi-Provider LLM โ Ollama, OpenAI, Anthropic, Bedrock, Azure, Vertex AI, Grok
- MemorySaver โ Conversation memory across clarification rounds
- MCP Protocol โ Streamable HTTP transport with auto-reconnection
- MCPToolkit โ Dynamic tool calling with
await toolkit.my_tool(param="value") - ToolCards โ Tool metadata with access_scope, checksum, and governance
- Agent Cards โ Structured agent metadata for semantic discovery
- A2A Validation โ HMAC-signed agent communication via OPA policies
- Semantic Layer โ Weaviate vector search for agents and tools
- Guardian โ OPA policy enforcement, audit logging, risk scoring
- Builder โ Creates ephemeral agents in Docker containers on demand
- Zombie Pattern โ Fast agent cloning from immutable base image
- CLI โ
abi-core create project,abi-core add abi-swarm,abi-core add agent
CLI Commands
# Project
abi-core create project <name> [--with-semantic-layer] [--with-guardian]
# Swarm (planner + orchestrator + builder + prerequisites)
abi-core add abi-swarm
# Agents
abi-core add agent <name> --description "..."
abi-core remove agent <name>
# Services
abi-core add semantic-layer
abi-core add service guardian-native
# Cleanup
abi-core remove abi-swarm
Project Structure
my-project/
โโโ agents/
โ โโโ planner/ # Task decomposition
โ โโโ orchestrator/ # Workflow coordination
โ โโโ builder/ # Ephemeral agent creation
โ โโโ my-agent/ # Your custom agents
โโโ services/
โ โโโ web_api/ # FastAPI application
โ โโโ semantic_layer/ # MCP server + Weaviate
โ โ โโโ agent_cards/
โ โ โโโ tool_cards/
โ โ โโโ embedding_mesh/
โ โโโ guardian/ # OPA security
โโโ compose.yaml
โโโ .abi/runtime.yaml
Documentation
https://abi-core.readthedocs.io
Contributing
git clone https://github.com/Joselo-zn/abi-core
cd abi-core-ai
uv sync --dev
uv run pytest
License
Apache 2.0 โ see LICENSE
Built by Josรฉ Luis Martรญnez โ Creator of ABI (Agent-Based Infrastructure)
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
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 abi_core_ai-1.8.3.tar.gz.
File metadata
- Download URL: abi_core_ai-1.8.3.tar.gz
- Upload date:
- Size: 265.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9723e5451750844537049049d45557cbdf806005460af5a917b5ce38fc8713fe
|
|
| MD5 |
94da6644acd18a543a01538a5ca2623b
|
|
| BLAKE2b-256 |
d881eb60f939942dd185579fff28698e777301b64dd12554f5d92c9213c2c405
|
File details
Details for the file abi_core_ai-1.8.3-py3-none-any.whl.
File metadata
- Download URL: abi_core_ai-1.8.3-py3-none-any.whl
- Upload date:
- Size: 312.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f1c32972924aaae1086c89802dbb663ae4d444c237009114b1a429d7ef417ef
|
|
| MD5 |
2cead50df4d05c64b318e14abdccc71a
|
|
| BLAKE2b-256 |
9b1988c0384cb54298ba8ed2c8a2e6e489b25ed76e1b556732c88252ae352ca6
|