Package Hierarchy
Core SDK Modules
agent/
agent/
Purpose: Agent class and execution
| File | Description |
|---|---|
agent.py | Main Agent class (6549 LOC) |
protocols.py | AgentProtocol, RunnableAgentProtocol |
handoff.py | Agent-to-agent handoff |
autonomy.py | Autonomous execution |
tools/
tools/
Purpose: Tool SDK and registry
| File | Description |
|---|---|
base.py | BaseTool class |
decorator.py | @tool decorator |
registry.py | ToolRegistry |
protocols/tool_protocol.py | ToolProtocol |
memory/
memory/
Purpose: Memory persistence
| File | Description |
|---|---|
protocols.py | MemoryProtocol, DeletableMemoryProtocol |
memory.py | Memory implementation |
file_memory.py | File-based adapter |
hooks/
hooks/
Purpose: Hook system and middleware
| File | Description |
|---|---|
events.py | Hook event types |
registry.py | Hook registration |
middleware.py | Middleware chains |
workflows/
workflows/
Purpose: Multi-agent coordination
| File | Description |
|---|---|
workflows.py | Workflow engine |
| Patterns | Route, Parallel, Loop, Repeat |
bus/
bus/
Purpose: Event bus for pub/sub
| File | Description |
|---|---|
bus.py | EventBus class |
event.py | Event types |
Data Flow
Extension Points
Tools
Add capabilities via @tool decorator or BaseTool
Hooks
Intercept events with before_tool, after_tool, etc.
Memory
Custom adapters implementing MemoryProtocol
Workflows
Multi-agent patterns with Route, Parallel, Loop
Repository Map
- Core SDK
- Wrapper
- Examples
- Documentation
Design Methodology
Key Files Reference
| What | Location |
|---|---|
| Agent class | praisonaiagents/agent/agent.py |
| Tool decorator | praisonaiagents/tools/decorator.py |
| BaseTool | praisonaiagents/tools/base.py |
| Memory protocols | praisonaiagents/memory/protocols.py |
| Hook events | praisonaiagents/hooks/events.py |
| Event bus | praisonaiagents/bus/bus.py |
| Workflow engine | praisonaiagents/workflows/workflows.py |
| Policy engine | praisonaiagents/policy/engine.py |
| Package exports | praisonaiagents/__init__.py |
| AGENTS guide | praisonai-agents/AGENTS.md |

