Skip to content

angee.agents.schema

GraphQL schema contributions for the agents addon.

Admin console surface for the agent catalogue: agents (and their templates), the skills they mount, the MCP servers/tools they reach, and the inference provider/model catalogue they run on. Platform-admin gated like the integrate console, so the REBAC-guarded relations these types expose (integration, credential, source, template) are safe — the const-admin reaches every related row. Skill sources are managed in the integrate VCS console (a kind="skill" source); this addon owns only the discovered :class:Skill rows.

InferenceProviderType

python
@strawberry_django.type(InferenceProvider)
class InferenceProviderType(AngeeNode)

Admin projection of an inference provider child model.

IntegrationInferenceProviderExtension

python
@strawberry_django.type(Integration, name="IntegrationType", extend=True)
class IntegrationInferenceProviderExtension()

Contributes the inference provider child onto integrate's IntegrationType.

inference_provider

python
@strawberry_django.field(only=["id"])
def inference_provider() -> InferenceProviderType | None

Return this integration's inference provider child when present.

InferenceModelType

python
@strawberry_django.type(InferenceModel)
class InferenceModelType(AngeeNode)

Admin projection of one model in a provider's catalogue.

SkillType

python
@strawberry_django.type(Skill)
class SkillType(AngeeNode)

Admin projection of one discovered skill.

MCPServerType

python
@strawberry_django.type(MCPServer)
class MCPServerType(AngeeNode)

Admin projection of one MCP server.

MCPToolType

python
@strawberry_django.type(MCPTool)
class MCPToolType(AngeeNode)

Admin projection of one MCP tool.

AgentType

python
@strawberry_django.type(Agent)
class AgentType(AngeeNode)

Admin projection of an agent (or, when is_template, an agent template).

AgentChatEndpoint

python
@strawberry.type
class AgentChatEndpoint()

Browser-reachable chat endpoint for a running agent.

url is the agent's routed WebSocket URL (no token); the browser appends token as a query parameter, which the central Caddy forward-auths against the operator. mcp_servers is the agent's rendered .mcp.json server map, so the chat session can advertise the same MCP servers the agent runs with. model_handle is the selected agent model in the service runtime's convention, used to select the ACP session model explicitly after session creation.

AgentSession

python
@strawberry.type
class AgentSession()

The agent that serves the user's current view, for the side chatter.

The view-driven counterpart to :class:AgentChatEndpoint: the chatter knows the view, not the agent, so this resolves which agent (identity only — name, status, model). The client then mints the chat endpoint for agent_id with agentChatEndpoint. A None result means the user has no running agent.

InferenceProviderInput

python
@strawberry.input
class InferenceProviderInput()

Fields accepted when creating an inference provider.

InferenceProviderPatch

python
@strawberry.input
class InferenceProviderPatch()

Fields accepted when updating an inference provider.

InferenceProviderCreateMutation

python
@strawberry.type
class InferenceProviderCreateMutation()

Admin create for an inference provider child row.

create_inference_provider

python
@strawberry.mutation(permission_classes=_ADMIN_PERMISSION_CLASSES)
def create_inference_provider(
        data: InferenceProviderInput) -> InferenceProviderType

Create an inference provider directly.

InferenceProviderConnectMutation

python
@strawberry.type
class InferenceProviderConnectMutation()

Authenticated OAuth connect for an inference provider child row.

connect_inference_provider

python
@strawberry.mutation
def connect_inference_provider(
        info: strawberry.Info,
        id: PublicID,
        redirect_uri: str = "",
        next: str = "/agents/providers") -> ConnectIntegrationResult

Attach the current user's OAuth credential to this inference provider.

InferenceProviderUpdateMutation

python
@strawberry.type
class InferenceProviderUpdateMutation()

Admin update for an inference provider child row.

update_inference_provider

python
@strawberry.mutation(permission_classes=_ADMIN_PERMISSION_CLASSES)
def update_inference_provider(
        data: InferenceProviderPatch) -> InferenceProviderType

Update a provider, rematerializing backend defaults when the backend changes.

AgentSessionQuery

python
@strawberry.type
class AgentSessionQuery()

Authenticated agent session queries for chat surfaces.

resolve_session_for_view

python
@strawberry.field
def resolve_session_for_view(view: JSON) -> AgentSession | None

Resolve the agent that serves the user's current view, for the side chatter.

The chatter knows the view, not the agent: this picks the actor's running agent (view["type"] is the routing seam for a later view-specialised agent) so the client can mint its chat endpoint (agentChatEndpoint). Returns None when the user has no running agent, so the chatter shows a call-to-action instead of erroring.

InferenceActionMutation

python
@strawberry.type
class InferenceActionMutation()

Operational actions on an inference provider.

refresh_provider_models

python
@strawberry.mutation(permission_classes=_ADMIN_PERMISSION_CLASSES)
def refresh_provider_models(id: PublicID) -> ActionResult

Re-list one provider's models into the catalogue now.

AgentActionMutation

python
@strawberry.type
class AgentActionMutation()

GraphQL action bridge for agent runtime operations.

provision_agent

python
@strawberry.mutation(permission_classes=_ADMIN_PERMISSION_CLASSES)
def provision_agent(id: PublicID) -> ActionResult

Render the agent into an operator workspace and service.

reprovision_agent

python
@strawberry.mutation(permission_classes=_ADMIN_PERMISSION_CLASSES)
def reprovision_agent(id: PublicID) -> ActionResult

Recreate the agent service over its existing workspace.

agent_chat_endpoint

python
@strawberry.mutation(permission_classes=_ADMIN_PERMISSION_CLASSES)
def agent_chat_endpoint(id: PublicID) -> AgentChatEndpoint

Mint the chat WebSocket endpoint + route token for a running agent.

A mutation, not a query: each call mints a fresh, short-lived per-actor route token (the operator admin bearer never reaches the browser). The browser speaks ACP to the agent's routed WebSocket through the central Caddy, forward-authed with that token. Errors when the agent is not running (no rendered service) or its service is not routed. The actor is the same identity operatorConnection mints with — the session user.

render_agent_prompt

python
@strawberry.mutation(permission_classes=_ADMIN_PERMISSION_CLASSES)
def render_agent_prompt(id: PublicID, view: JSON) -> str

Render the <system_context> block for an agent and the user's open view.

view is the view envelope {kind, type: "<app>/<model>", sqid?, sqids?, params?}. The chat client calls this each send and prefixes the result, so the agent reads what the user is looking at. Resolving the agent (admin-gated) confirms the caller may drive it; the model-generic rendering lives in agents.context.

deprovision_agent

python
@strawberry.mutation(permission_classes=_ADMIN_PERMISSION_CLASSES)
def deprovision_agent(id: PublicID) -> ActionResult

Tear down the agent's operator workspace and service.

schemas

GraphQL contributions installed by the agents addon.

Released under the AGPL-3.0 License.