30 releases (9 major breaking)
Uses new Rust 2024
| 11.0.0 | Dec 31, 2025 |
|---|---|
| 11.0.0-alpha.1 | Jan 19, 2026 |
| 10.0.0 | Dec 30, 2025 |
| 9.0.0 | Dec 19, 2025 |
| 1.2.0 | Nov 23, 2025 |
#97 in Testing
77 downloads per month
Used in 4 crates
560KB
10K
SLoC
elizacp
A classic Eliza chatbot implemented as an ACP (Agent-Client Protocol) agent.
Overview
Elizacp provides a simple, predictable agent implementation that's useful for:
- Testing ACP clients - Lightweight agent with deterministic pattern-based responses
- Protocol development - Verify ACP implementations without heavy AI infrastructure
- Learning ACP - Clean example of implementing the Agent-Client Protocol
Features
- Classic Eliza patterns - Pattern matching and reflection-based responses
- Full ACP support - Session management, initialization, and prompt handling
- Per-session state - Each session maintains its own Eliza instance
- Extensible patterns - Easy to add new response patterns (including future tool use triggers)
Usage
Running the agent
# Build and run
cargo run -p elizacp
# With debug logging
cargo run -p elizacp -- --debug
The agent communicates over stdin/stdout using JSON-RPC, following the ACP specification.
Testing with an ACP client
Elizacp responds to:
- Initialize requests - Returns capabilities
- New/Load session requests - Creates session state
- Prompt requests - Responds with Eliza-style conversational replies
Example conversation:
User: Hello
Eliza: Hello. How are you feeling today?
User: I am sad
Eliza: Do you often feel sad?
User: I feel worried about my father
Eliza: Tell me more about your family.
Implementation
eliza.rs- Pattern matching engine with classic Eliza responsesmain.rs- ACP agent implementation over stdio
Architecture
The agent maintains a HashMap<SessionId, Eliza> to track per-session state. Each session gets its own Eliza instance with independent conversation state.
Future Extensions
The pattern database structure is designed to support:
- Tool use triggers (e.g., "what's the weather" → tool call)
- Custom response patterns
- Conversation history tracking
- Multi-turn context awareness
Dependencies
~31–52MB
~720K SLoC