Implement CORE Profile
Learn about ARAL-CORE conformance
This guide walks you through building your first ARAL-compliant agent from scratch. By the end, you’ll have a working agent that follows the ARAL Core specification.
Before you begin, make sure you have:
Create Project Directory
mkdir my-first-aral-agentcd my-first-aral-agentInitialize Project
For Python:
python -m venv venvsource venv/bin/activate # On Windows: venv\Scripts\activatepip install aral-sdk anthropicFor Node.js:
npm init -ynpm install @aral/sdk anthropicCreate Configuration
Create agent.config.json:
{ "agent_id": "my-first-agent", "version": "0.1.0", "runtime": { "max_memory_mb": 256, "max_cpu_percent": 50, "shutdown_timeout_ms": 10000 }}Set up the runtime layer to manage your agent’s lifecycle.
from aral import ARALAgent, RuntimeConfig
# Configure runtimeruntime = RuntimeConfig( agent_id="my-first-agent", version="0.1.0", max_memory_mb=256, health_check_port=8080)
# Initialize agentagent = ARALAgent(runtime=runtime)
# Start health check endpointagent.start_health_endpoint()Add memory capabilities for context management.
from aral import MemoryLayer
# Initialize memorymemory = MemoryLayer( max_size_mb=100, ttl_seconds=3600, eviction_policy="lru")
# Add memory to agentagent.set_memory(memory)
# Store contextmemory.store({ "type": "short_term", "content": {"user_preference": "concise responses"}, "ttl_seconds": 3600})Define the actions your agent can perform.
from aral import Capability
# Define a simple capabilitysearch_capability = Capability( id="web_search", name="Web Search", description="Search the web for information", input_schema={ "type": "object", "properties": { "query": {"type": "string"} }, "required": ["query"] }, permissions=["network:read"], handler=search_handler # Your implementation)
# Register capabilityagent.register_capability(search_capability)Configure the reasoning layer with your LLM.
from aral import ReasoningLayerfrom anthropic import Anthropic
# Initialize LLM clientllm_client = Anthropic(api_key="your-api-key")
# Configure reasoningreasoning = ReasoningLayer( llm_client=llm_client, model="claude-3-sonnet-20240229", max_reasoning_depth=3, temperature=0.7)
# Set reasoning layeragent.set_reasoning(reasoning)Define your agent’s identity and constraints.
{ "id": "persona-my-first-agent", "name": "Helpful Assistant", "role": "assistant", "version": "1.0.0", "constraints": { "allowed_capabilities": ["web_search", "calculate"], "denied_capabilities": [], "max_reasoning_depth": 3, "require_confirmation": [] }, "personality": { "tone": "friendly", "verbosity": "concise" }}from aral import Persona
# Load personapersona = Persona.from_file("persona.json")
# Validate and set personaagent.set_persona(persona)Here’s the complete agent code:
from aral import ARALAgent, RuntimeConfig, MemoryLayer, Capability, ReasoningLayer, Personafrom anthropic import Anthropic
# 1. Runtimeruntime = RuntimeConfig( agent_id="my-first-agent", version="0.1.0", max_memory_mb=256)agent = ARALAgent(runtime=runtime)
# 2. Memorymemory = MemoryLayer(max_size_mb=100, ttl_seconds=3600)agent.set_memory(memory)
# 3. Capabilitiesdef search_handler(params): query = params["query"] # Your search implementation return {"results": [...]}
search_cap = Capability( id="web_search", name="Web Search", input_schema={"type": "object", "properties": {"query": {"type": "string"}}}, permissions=["network:read"], handler=search_handler)agent.register_capability(search_cap)
# 4. Reasoningllm = Anthropic(api_key="your-api-key")reasoning = ReasoningLayer(llm_client=llm, model="claude-3-sonnet-20240229")agent.set_reasoning(reasoning)
# 5. Personapersona = Persona.from_file("persona.json")agent.set_persona(persona)
# Start agentif __name__ == "__main__": agent.start()Start the agent
python agent.pyCheck health
curl http://localhost:8080/healthSend a request
curl -X POST http://localhost:8080/invoke \ -H "Content-Type: application/json" \ -d '{"input": "Search for ARAL documentation"}'Verify your agent follows ARAL requirements:
# Install test suitepip install aral-test-harness
# Run conformance testsaral-test --agent-url http://localhost:8080 --profile COREImplement CORE Profile
Learn about ARAL-CORE conformance
Add More Capabilities
Explore custom capabilities
Multi-Agent Systems
Build orchestrated agents
Production Deployment
Read the specification
RuntimeConfig are setps aux | grep pythontail -f agent.log© 2026 IbIFACE — CC BY 4.0