Skip to main content

Module agent

Module agent 

Source
Expand description

Pawan Agent - The core agent that handles tool-calling loops

This module provides the main PawanAgent which:

  • Manages conversation history
  • Coordinates tool calling with the LLM via pluggable backends
  • Provides streaming responses
  • Supports multiple LLM backends (NVIDIA API, Ollama, OpenAI)

Modules§

backend
LLM Backend trait and implementations
git_session
Git-backed session store — conversation trees with fork/lineage/leaves
session
Session persistence — save and resume conversations

Structs§

AgentResponse
Result from a complete agent execution
LLMResponse
LLM response from a generation request
Message
A message in the conversation
PawanAgent
The main Pawan agent The main Pawan agent
TokenUsage
Token usage from an LLM response
ToolCallRecord
Record of a tool call execution
ToolCallRequest
A request to call a tool
ToolResultMessage
Result from a tool execution

Enums§

Role
Role of a message sender

Type Aliases§

TokenCallback
Callback for receiving streaming tokens
ToolCallback
Callback for receiving tool call updates
ToolStartCallback
Callback for tool call start notifications