API Reference
The public surface of neuroagent — everything below is importable
from the top-level package: from neuroagent import .... Only names exported from
neuroagent/__init__.py are stable; everything else is internal.
Core
| Name | What it is |
Agent | The atom — runs prompts, tools, memory, RAG, tracing, cost |
AgentResponse | content, messages, usage, steps, trace_id |
Message, Role, ToolCall, Usage | Normalized message/usage primitives |
Settings | Global defaults (provider/model), env-driven config |
Tool, tool | Tool ABC and the @tool decorator |
Composition
| Name | What it is |
Workflow, Step | DAG orchestration over agents/callables |
Team, TeamMember | Multi-agent collaboration patterns |
Channel | In-process agent-to-agent messaging |
DatabaseAgent | NL → SQL, read-only by default |
APIAgent | NL → HTTP request, read-only by default |
create_app | FastAPI app factory ([server] extra) |
Memory & RAG
| Name | What it is |
Memory | Memory backend ABC (load/append/search) |
KnowledgeBase | Embed/store/retrieve documents for RAG |
Observability & cost
| Name | What it is |
Trace, Tracer | Span-tree tracing of a run |
CostTracker | Token usage → normalized cost |
Security
| Name | What it is |
RBAC | Roles → permissions, with * / ns:* wildcards |
AuditLog | Append-only audit events (optional JSONL sink) |
SecretStore | Secret resolution + masking (encryption via [security]) |
Sandbox | Allow/deny command policy for shell/code/SQL tools |
Integrations
| Name | What it is |
Integration | Base class over the API-agent foundation |
ShopifyIntegration | Admin REST API |
SalesforceIntegration | REST / SOQL |
OdooIntegration | JSON-RPC execute_kw / search_read |
SAPIntegration | OData v2/v4, OAuth or basic auth |
Exceptions
Every exception derives from NeuroAgentError:
| Name | Raised when |
ConfigError | Invalid or missing configuration |
ProviderError | An LLM provider call fails |
ToolExecutionError | A tool raises during execution |
MemoryBackendError | A memory backend operation fails |
RetrievalError | RAG retrieval fails |
DatabaseError | A database-agent query fails |
APIError | An API-agent / integration request fails |
WorkflowError | A workflow step fails or the DAG is invalid |
SecurityError | RBAC/sandbox denies an action |
MissingDependencyError | An extra is required but not installed |
NotSupportedError | A capability isn't supported by the active backend |
Full implementation details and the architectural contracts (the ABCs) live in
docs/ARCHITECTURE.md
on GitHub.