praxis-types
Core types and event model for the Praxis AI agent framework.
Overview
This crate provides the foundational types used across all Praxis crates:
- Event Model:
StreamEventenum for real-time streaming - Configuration: Shared configuration types
- Message Types: Structured message representations
- Common Traits: Shared traits for extensibility
Features
- Zero-copy event streaming with
StreamEvent - Serde serialization support
- Chrono-based timestamps
- UUID-based identifiers
Installation
[]
= "0.1"
Usage
StreamEvent
The core event type for streaming AI agent responses:
use StreamEvent;
match event
Configuration
use Config;
let config = Config ;
Event Model
Praxis uses a canonical event model for streaming:
- Message: Assistant's response content (token-by-token)
- Reasoning: Internal reasoning/thinking process
- ToolCall: Function/tool invocation request
- ToolResult: Result from tool execution
- Done: Stream completion marker
This unified event model works across all components (LLM, Graph, API).
Part of Praxis Framework
This crate is part of the Praxis AI Agent Framework:
- praxis-graph - React agent orchestrator
- praxis-llm - LLM client (OpenAI, Azure)
- praxis-mcp - Model Context Protocol client
- praxis-persist - MongoDB persistence
License
MIT