agentconnect.agents.human_agent module¶
Human agent implementation for the AgentConnect framework.
This module provides a human agent that can interact with AI agents through a command-line interface.
- class HumanAgent(agent_id, name, identity, organization_id=None, response_callbacks=None)¶
Bases:
BaseAgent
Human agent implementation for interactive communication with AI agents.
This agent handles:
Real-time text input/output
Message verification and security
Graceful conversation management
Error handling and recovery
- Parameters:
- async start_interaction(target_agent)¶
Start an interactive session with an AI agent
- async process_message(message)¶
Process incoming messages from other agents
- async send_message(receiver_id, content, message_type=MessageType.TEXT, metadata=None)¶
Override send_message to track human responses and notify callbacks
- add_response_callback(callback)¶
Add a callback to be notified when the human sends a response