Agent-Based Infrastructure Core - Runtime and CLI
Project description
ABI-Core ๐ค
ABI-Core-AI โ The foundation for building Agent-Based Infrastructure (ABI) โ a new architectural paradigm where intelligent agents collaborate through semantic context, policy-driven governance, and modular orchestration.
Agent-Based Infrastructure Core โ A comprehensive framework for building, deploying, and managing AI agent systems with semantic layers, orchestration, and security policies.
๐งญ Core Philosophy
ABI-Core is built on three fundamental principles:
- Semantic Interoperability โ Agents must share meaning, not just data.
- Distributed Intelligence โ No single model owns the truth; collaboration is the substrate.
- Governed Autonomy โ Security and compliance must evolve as fast as intelligence itself.
โ ๏ธ Beta Release: This is a beta version. APIs may change and some features are experimental.
๐ Quick Start
Installation
pip install abi-core-ai
Create Your First Project
# Create a new ABI project with semantic layer
abi-core create project my-ai-system --with-semantic-layer
# Navigate to your project
cd my-ai-system
# Provision models (automatically starts services and downloads models)
abi-core provision-models
# Create an agent
abi-core add agent my-agent --description "My first AI agent"
# Create an agent card for semantic discovery
abi-core add agent-card my-agent --description "General purpose AI assistant" --url http://localhost:8000
# Run your project
abi-core run
๐ Need help? Check out our complete documentation with guides, examples, and API reference.
๐ง Model Serving Options
ABI-Core supports two model serving strategies for Ollama:
Centralized (Recommended for Production)
A single shared Ollama service serves all agents:
- โ Lower resource usage โ One Ollama instance for all agents
- โ Easier model management โ Centralized model updates
- โ Faster agent startup โ No need to start individual Ollama instances
- โ Centralized caching โ Shared model cache across agents
abi-core create project my-app --model-serving centralized
Distributed (Default)
Each agent has its own Ollama instance:
- โ Complete isolation โ Each agent has independent models
- โ Independent versions โ Different model versions per agent
- โ Development friendly โ Easy to test different configurations
- โ ๏ธ Higher resource usage โ Multiple Ollama instances
abi-core create project my-app --model-serving distributed
# or simply (distributed is default)
abi-core create project my-app
Note: Guardian service always maintains its own Ollama instance for security isolation, regardless of the chosen mode.
๐ฏ What is ABI-Core?
ABI-Core-AI is a production-ready framework for building Agent-Based Infrastructure systems that combine:
- ๐ค AI Agents โ LangChain-powered agents with A2A (Agent-to-Agent) communication
- ๐ง Semantic Layer โ Vector embeddings and distributed knowledge management
- ๐ Security โ OPA-based policy enforcement and access control
- ๐ Web Interfaces โ FastAPI-based REST APIs and real-time dashboards
- ๐ฆ Containerization โ Docker-ready deployments with orchestration
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ AI Agents โโโโโบโ Semantic Layer โโโโโบโ Guardian โ
โ โ โ โ โ Security โ
โ โข LangChain โ โ โข Vector DB โ โ โข OPA Policies โ
โ โข A2A Protocol โ โ โข Embeddings โ โ โข Access Controlโ
โ โข Custom Logic โ โ โข Knowledge โ โ โข Monitoring โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโ
โ Web Interface โ
โ โ
โ โข FastAPI โ
โ โข Real-time UI โ
โ โข Monitoring โ
โโโโโโโโโโโโโโโโโโโ
๐ Features
๐ค Agent System
- Multi-Agent Architecture โ Create specialized agents for different tasks
- A2A Communication โ Agents can communicate and collaborate
- LangChain Integration โ Leverage the full LangChain ecosystem
- Custom Tools โ Extend agents with domain-specific capabilities
๐ง Semantic Layer
- Agent Discovery โ MCP-based agent finding and routing
- Vector Storage โ Weaviate-based semantic search (automatically configured)
- Agent Cards โ Structured agent metadata and capabilities
- Access Validation โ OPA-integrated security for semantic access
- Embedding Mesh โ Distributed embedding computation and caching
- Context Awareness โ Agents understand semantic relationships
- Auto-Configuration โ Weaviate vector database included automatically
๐ Security & Governance
- Policy Engine โ Open Policy Agent (OPA) integration
- Access Control โ Fine-grained permissions and roles
- Audit Logging โ Complete activity tracking
- Compliance โ Built-in security best practices
๐ Web & APIs
- REST APIs โ FastAPI-based service endpoints
- Real-time Updates โ WebSocket support for live data
- Admin Dashboard โ Monitor and manage your agent system
- Custom UIs โ Build domain-specific interfaces
๐ ๏ธ CLI Commands
Project Management
# Create new projects with optional services and model serving strategy
abi-core create project <name> [--domain <domain>] [--with-semantic-layer] [--with-guardian] [--model-serving centralized|distributed]
abi-core provision-models # Download and configure LLM models (auto-starts services)
abi-core status # Check project status
abi-core run # Start all services
abi-core info # Show project information
Agent Development
# Create and manage agents
abi-core add agent <name> [--description <desc>] [--model <model>] [--with-web-interface]
abi-core remove agent <name> # Remove an agent
abi-core info agents # List all agents
Services Management
# Add services to existing projects
abi-core add service semantic-layer [--name <name>] [--domain <domain>]
abi-core add service guardian [--name <name>] [--domain <domain>]
abi-core add service guardian-native [--name <name>] [--domain <domain>]
# Quick service shortcuts
abi-core add semantic-layer [--domain <domain>] # Add semantic layer directly
abi-core remove service <name> # Remove any service
Agent Cards & Semantic Layer
# Manage agent cards for semantic discovery
abi-core add agent-card <name> [--description <desc>] [--model <model>] [--url <url>] [--tasks <tasks>]
abi-core add policies <name> [--domain <domain>] # Add security policies
Examples
# Create a finance project with centralized model serving (recommended for production)
abi-core create project fintech-ai --domain finance --with-semantic-layer --with-guardian --model-serving centralized
cd fintech-ai
# Provision models (starts Ollama and downloads qwen2.5:3b + embeddings)
abi-core provision-models
# Add a specialized trading agent (automatically uses centralized Ollama)
abi-core add agent trader --description "AI trading assistant" --model qwen2.5:3b
# Create agent card for semantic discovery
abi-core add agent-card trader --description "Execute trading operations" --url http://localhost:8001 --tasks "trade,analyze,risk-assessment"
# Add semantic layer to existing project (Weaviate included automatically)
abi-core add semantic-layer --domain finance
# Create a development project with distributed model serving (each agent has own Ollama)
abi-core create project dev-project --model-serving distributed
cd dev-project
# Provision models (starts all agents with their Ollama instances + main Ollama for embeddings)
abi-core provision-models
# Remove components when needed
abi-core remove service semantic_layer
abi-core remove agent trader
๐ Project Structure
When you create a new project, you get:
my-project/
โโโ agents/ # Your AI agents
โ โโโ my-agent/
โ โโโ agent.py # Agent implementation
โ โโโ main.py # Entry point
โ โโโ models.py # Data models
โ โโโ agent_cards/ # Agent cards for semantic discovery
โโโ services/ # Supporting services
โ โโโ semantic_layer/ # AI agent discovery & routing
โ โ โโโ layer/
โ โ โโโ mcp_server/ # MCP server for agent communication
โ โ โโโ embedding_mesh/ # Vector embeddings & search
โ โโโ guardian/ # Security & policy enforcement
โโโ agent_cards/ # Global agent cards directory
โโโ config/ # Configuration files
โ โโโ config.py
โโโ compose.yaml # Container orchestration
โโโ .abi/ # ABI project metadata
โ โโโ runtime.yaml
โโโ README.md # Project documentation
๐ง Configuration
ABI-Core uses environment variables and YAML configuration files:
# .abi/runtime.yaml
agents:
my-agent:
model: "qwen2.5:3b"
port: 8000
semantic_layer:
provider: "weaviate"
host: "localhost:8080"
security:
opa_enabled: true
policies_path: "./policies"
๐ Deployment
Docker (Recommended)
docker-compose up --build
docker-compose up --scale my-agent=3
Kubernetes
abi-core-ai deploy kubernetes
kubectl apply -f ./k8s/
๐งช Examples
Simple Agent
from abi_core_ai.agent.agent import AbiAgent
from abi_core_ai.common.utils import abi_logging
class MyAgent(AbiAgent):
def __init__(self):
super().__init__(
agent_name='my-agent',
description='A helpful AI assistant'
)
async def stream(self, query: str, context_id: str, task_id: str):
abi_logging(f"Processing: {query}")
response = await self.llm.ainvoke(query)
yield {
'content': response.content,
'response_type': 'text',
'is_task_completed': True
}
Agent Communication
await self.send_message(
target_agent="agent-b",
message="Process this data",
data={"items": [1, 2, 3]}
)
๐ Documentation
๐ Full Documentation: https://abi-core.readthedocs.io
- Getting Started - Installation and quick start
- Quick Start Guide - Get running in 5 minutes
- Models Guide - Model selection and provisioning
- FAQ - Frequently asked questions
- Architecture - System design and concepts
๐ค Contributing
We welcome contributions! This is a beta release, so your feedback is especially valuable.
Development Setup
git clone https://github.com/Joselo-zn/abi-core-ai
cd abi-core-ai
uv sync --dev
Running Tests
uv run pytest
๐ License
Apache 2.0 License โ see LICENSE for details.
๐ Support
- Issues โ GitHub Issues
- Discussions โ GitHub Discussions
- Email โ jl.mrtz@gmail.com
๐บ๏ธ Roadmap
| Milestone | Description | Status |
|---|---|---|
| v0.2.0 | Enhanced agent orchestration | ๐ In progress |
| v0.3.0 | Advanced semantic search | ๐ง Planned |
| v0.4.0 | Multi-cloud deployment | ๐งฉ Planned |
| v1.0.0 | Production-ready stable release | ๐ Target Q3 2026 |
Built with โค๏ธ by Josรฉ Luis Martรญnez
Creator of ABI (Agent-Based Infrastructure) โ redefining how intelligent systems interconnect.
โจ From Curiosity to Creation: A Personal Note
I first saw a computer in 1995. My dad had received a Windows 3.11 machine as payment for a job. I was fascinated. At the time, I wanted to study robotics โ but when I touched that machine, everything changed.
I didn't understand what the Internet was, and I had no idea where to goโฆ but even in that confusion, I felt something big. When I wrote my first Visual C++ program in 1999, I felt like a hacker. When I built my first web page, full of GIFs, I was flying.
Nobody taught me. I just read manuals. And now, years later, that journey continues โ not just as a coder, but as the creator of ABI. This is for the kids like me, then and now.
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-0.1.0b107.tar.gz.
File metadata
- Download URL: abi_core_ai-0.1.0b107.tar.gz
- Upload date:
- Size: 310.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9acfeec16f0a630fe0d36a0d90f9486d2c5dc53988abd807f37740699389f146
|
|
| MD5 |
71688f8854cbd4ce584cbd5f40468895
|
|
| BLAKE2b-256 |
655d488783967511b898b28711bf1ce96eb5936ae1488b10ab5622b49c9e83f5
|
File details
Details for the file abi_core_ai-0.1.0b107-py3-none-any.whl.
File metadata
- Download URL: abi_core_ai-0.1.0b107-py3-none-any.whl
- Upload date:
- Size: 247.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1d1965b7588def1b35883411d643f9802e4ce033421394218b2d070cbff29c0
|
|
| MD5 |
a23895addd975813a0f32affccc10e38
|
|
| BLAKE2b-256 |
3ddae2d4e699db1672f7a205619491ebcf7f55242be9f69a66111e1051c9a3a1
|