antikythera_agents
¤
Classes¤
Agent
¤
Base class for all Antikythera agents.
An agent is responsible for executing tasks of a specific type. Each agent can have multiple tools (methods) that handle different operations.
Notes
Override this method to set up connections, load models, etc.
Functions¤
can_claim_task
¤
dispose
¤
Clean up resources and perform shutdown operations.
Notes
Override this method to close connections, save state, etc.
execute_task
¤
Execute a task using the appropriate tool.
Parameters:
-
task(Task) –The task to execute
-
context(ExecutionContext, default:None) –The runtime context for the execution
Returns:
-
dict–Dictionary of outputs from the tool execution
Raises:
-
ValueError–If no tool is found for the task type
-
RuntimeError–If task execution fails
has_tool
¤
list_tools
¤
List all available tools for this agent.
Returns:
-
dict–Dictionary mapping tool names to their method names
managed_execution
¤
Context manager for safe agent execution with proper resource management.
Functions¤
agent
¤
agent(type: str)
Decorator to register an agent class with a specific type.
Parameters:
-
type(str) –The agent type identifier (e.g., "system", "user_interaction")
Examples:
get_agent_class
¤
list_registered_agents
¤
List all registered agent types and their classes.
Returns:
-
dict–Dictionary mapping agent type strings to their classes