dataflow.api.routes.agent_discovery_routes¶

Agent discovery and management API routes.

This module provides FastAPI routes for discovering and managing both v1 and v2 agents: - v1 agents: haive.engine.agent.config/agent (config-based agents) - v2 agents: haive.agents.base.agent (direct agent classes)

Classes¶

AgentCreateRequest

Request to create/instantiate an agent.

AgentCreateResponse

Response from agent creation.

AgentInfo

Information about an agent.

AgentListResponse

Response for agent list endpoint.

AgentSchema

Agent configuration/input schema information.

Functions¶

discover_all_agents()

Discover both v1 and v2 agents.

discover_v1_agents()

Discover v1 agents from haive.engine.agent.

discover_v2_agents()

Discover v2 agents from haive.agents.base.agent.

get_agent_details(agent_name)

Get detailed information about a specific agent.

get_agent_schema(agent_name)

Get the configuration/initialization schema for a specific agent.

list_agents()

List all available agents (both v1 and v2).

search_agents([query, agent_type, category])

Search for agents by query, type, or category.

Module Contents¶

class dataflow.api.routes.agent_discovery_routes.AgentCreateRequest(/, **data)¶

Bases: pydantic.BaseModel

Request to create/instantiate an agent.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

class dataflow.api.routes.agent_discovery_routes.AgentCreateResponse(/, **data)¶

Bases: pydantic.BaseModel

Response from agent creation.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

class dataflow.api.routes.agent_discovery_routes.AgentInfo(/, **data)¶

Bases: pydantic.BaseModel

Information about an agent.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

class dataflow.api.routes.agent_discovery_routes.AgentListResponse(/, **data)¶

Bases: pydantic.BaseModel

Response for agent list endpoint.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

class dataflow.api.routes.agent_discovery_routes.AgentSchema(/, **data)¶

Bases: pydantic.BaseModel

Agent configuration/input schema information.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

dataflow.api.routes.agent_discovery_routes.discover_all_agents()¶

Discover both v1 and v2 agents.

Return type:

list[AgentInfo]

dataflow.api.routes.agent_discovery_routes.discover_v1_agents()¶

Discover v1 agents from haive.engine.agent.

Return type:

list[AgentInfo]

dataflow.api.routes.agent_discovery_routes.discover_v2_agents()¶

Discover v2 agents from haive.agents.base.agent.

Return type:

list[AgentInfo]

async dataflow.api.routes.agent_discovery_routes.get_agent_details(agent_name)¶

Get detailed information about a specific agent.

Parameters:

agent_name (str) – Name of the agent to get details for

Returns:

Detailed information about the agent

Return type:

dict[str, Any]

async dataflow.api.routes.agent_discovery_routes.get_agent_schema(agent_name)¶

Get the configuration/initialization schema for a specific agent.

Parameters:

agent_name (str) – Name of the agent to get schema for

Returns:

AgentSchema containing configuration and method information

Return type:

AgentSchema

async dataflow.api.routes.agent_discovery_routes.list_agents()¶

List all available agents (both v1 and v2).

Returns:

AgentListResponse containing list of available agents

Return type:

AgentListResponse

async dataflow.api.routes.agent_discovery_routes.search_agents(query=None, agent_type=None, category=None)¶

Search for agents by query, type, or category.

Parameters:
  • query (str | None) – Search query to match against agent names and descriptions

  • agent_type (str | None) – Filter by agent type (‘v1’ or ‘v2’)

  • category (str | None) – Filter by category

Returns:

AgentListResponse containing filtered list of agents

Return type:

AgentListResponse