Local AI orchestration framework combining Ollama, state management, and deterministic task execution.
Building autonomous AI systems requires:
- Multiple Components: LLMs, state management, task queues, external APIs
- Integration Friction: Custom glue code to connect them
- Dependency Complexity: Managing authentication, configurations, failures
- Debugging Difficulty: Hard to trace execution flow across systems
Traditional approaches require cloud APIs, constant internet connection, and complex deployment pipelines.
Aura is a modular, local-first orchestration framework that:
β
Runs Entirely Local - Ollama LLM + Firebase mock + local storage
β
Zero API Dependencies - No external services required
β
Event-Driven - Clean event listeners for system integration
β
Modular Components - Mix and match based on your needs
β
Production-Ready - Structured logging, error handling, state persistence
graph TB
Input["Input<br/>(Any Source)"] -->|Listen| Agent["Aura Agent<br/>(Orchestrator)"]
Agent -->|Process| LLM["Ollama LLM<br/>(Local)"]
Agent -->|State| State["Firebase Mock<br/>(Local JSON)"]
Agent -->|Execute| Executor["Task Executor<br/>(Automations)"]
Executor -->|Emit| Tasks["Task Results"]
Tasks -->|Store| State
style Agent fill:#4a90e2
style LLM fill:#50e3c2
style State fill:#f5a623
style Executor fill:#b8e986
- Python 3.8+
- Ollama running locally on
http://localhost:11434 - Mistral model:
ollama pull mistral
git clone https://github.com/buubear14/aura-local-agent.git
cd aura-local-agent
pip install -r requirements.txtpython examples/example_basic_usage.pyExpected output:
π Agent Status:
{
"state": "idle",
"pending_tasks": 0,
"completed_tasks": 0,
"llm_available": true
}
π Processing cycle:
π₯ Input received: {"type": "lead_submission", ...}
π§ LLM processed: 45 tokens
π Task queued: task_1716...
βοΈ Executing tasks:
β Task Completed: task_1716... (log_lead)
Central configuration for all components.
from src.config import CONFIG
print(CONFIG.ollama.model) # "mistral"
print(CONFIG.firebase.use_mock) # TrueInterface to local Ollama with structured prompting.
from src.ollama_wrapper import OllamaWrapper
ollama = OllamaWrapper()
response = ollama.structured_extraction(
data="Company: TechCorp, Employees: 150",
schema={"company": "string", "employees": "number"}
)
print(response.output) # Valid JSONLocal state persistence without Firebase credentials.
from src.firebase_state import StateManager
state = StateManager()
state.save_task("task_1", {"company": "TechCorp", "tier": "Hot"})
task = state.get_task("task_1") # Retrieve anytimeHandles automation task execution.
from src.task_executor import TaskExecutor, AutomationTask
executor = TaskExecutor()
task = AutomationTask("task_1", "send_email", {"to": "user@example.com"})
result = executor.execute(task)
print(result.status) # TaskStatus.COMPLETEDMain orchestration engine combining all components.
from src.agent import get_agent
agent = get_agent()
# Listen for input
agent.listen_for_input(lambda: {"type": "lead_received", ...})
# Execute pending tasks
executed = agent.execute_pending_tasks()
# Check status
print(agent.get_status())Register event listeners for custom logic:
from src.agent import get_agent
agent = get_agent()
# Listen for task received
agent.on("task_received", lambda task: print(f"New task: {task.task_id}"))
# Listen for task completed
agent.on("task_completed", lambda task: print(f"Completed: {task.result}"))
# Listen for context updates
agent.on("context_updated", lambda ctx: print(f"Context: {ctx}"))python examples/example_basic_usage.pyShows complete flow: input β LLM processing β task execution
python examples/example_firebase_integration.pyDemonstrates state persistence and querying
The TaskExecutor supports these automation types out of the box:
| Task Type | Purpose | Mock Behavior |
|---|---|---|
send_email |
Send emails | Logs to console |
log_lead |
Record lead data | Stores in state |
update_crm |
Update CRM record | Logs update |
schedule_demo |
Schedule meeting | Generates meet link |
webhook_call |
Call HTTP webhook | Logs to console |
database_write |
Write to database | Records in state |
Register custom handlers:
def my_custom_task(params):
return {"status": "completed", "result": params}
agent.task_executor.register_handler("my_task", my_custom_task)All state is automatically saved to .aura/firebase_state.json:
{
"tasks": {
"task_001": {
"data": {"company": "TechCorp", "tier": "Hot"},
"created_at": "2024-01-15T10:30:00",
"updated_at": "2024-01-15T10:35:00"
}
},
"agent": {
"context": {
"last_analysis": "...",
"confidence": 85
}
}
}Configure via environment variables or config.py:
export OLLAMA_BASE_URL="http://localhost:11434"
export OLLAMA_MODEL="mistral"
export OLLAMA_TEMPERATURE="0"
export FIREBASE_USE_MOCK="true"
export AURA_DEBUG="true"
export AURA_LOG_LEVEL="DEBUG"Or programmatically:
from src.config import ConfigManager
config = ConfigManager()
config.ollama.model = "neural-chat"
config.agent.debug = Truefrom src.agent import get_agent
from flask import Flask
app = Flask(__name__)
agent = get_agent()
@app.route('/webhook', methods=['POST'])
def webhook():
agent.listen_for_input(lambda: request.json)
agent.execute_pending_tasks()
return {"status": "processed"}from src.agent import get_agent
from apscheduler.schedulers.background import BackgroundScheduler
agent = get_agent()
scheduler = BackgroundScheduler()
def check_for_tasks():
agent.execute_pending_tasks()
scheduler.add_job(check_for_tasks, 'interval', minutes=5)
scheduler.start()from src.agent import get_agent
import click
agent = get_agent()
@click.command()
@click.argument('input_file')
def process(input_file):
with open(input_file) as f:
data = json.load(f)
agent.listen_for_input(lambda: data)
agent.execute_pending_tasks()
print(agent.get_status())
if __name__ == '__main__':
process()- Local Only: Requires Ollama running locally
- Single Machine: State is local JSON, not distributed
- Model Dependent: Quality depends on Mistral's capabilities
- Context Window: Limited to Mistral's 8K token context
- Try Example 1 to see basic flow
- Modify task handlers for your use cases
- Register custom event listeners
- Integrate with your data sources
- Deploy to production with proper monitoring
- LLM: Ollama (Mistral)
- State: Local JSON files
- Language: Python 3.8+
- Async: Standard library (threading ready)
- Logging: Python logging module
Contributions welcome! Areas for enhancement:
- Additional task executors (SMS, Slack, Teams)
- Async/parallel task execution
- Advanced state querying
- Performance optimizations
- Cloud backend support (optional)
MIT License - See LICENSE file
Adriaan du Randt - Prompt Engineering & Automation Specialist
- GitHub: @buubear14
- Email: adriaandurandt@gmail.com
- Structural Prompting Framework: Deterministic prompt engineering
- Information Broker: B2B lead generation pipeline
- Agent-47: Modular Gemini CLI automation
Start with Example 1 to see Aura in action.