> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Server Registry • AI Agent SDK

> ServerRegistry: Registry for API server state per-port.

# ServerRegistry

> Defined in the [**agent**](../modules/agent) module.

<Badge color="blue">AI Agent</Badge>

Registry for API server state per-port.

## Methods

<CardGroup cols={2}>
  <Card title="get_default_instance()" icon="function" href="../functions/ServerRegistry-get_default_instance">
    Get default global registry for backward compatibility.
  </Card>

  <Card title="is_server_started()" icon="function" href="../functions/ServerRegistry-is_server_started">
    Instance method.
  </Card>

  <Card title="set_server_started()" icon="function" href="../functions/ServerRegistry-set_server_started">
    Instance method.
  </Card>

  <Card title="get_shared_app()" icon="function" href="../functions/ServerRegistry-get_shared_app">
    Instance method.
  </Card>

  <Card title="set_shared_app()" icon="function" href="../functions/ServerRegistry-set_shared_app">
    Instance method.
  </Card>

  <Card title="register_agent()" icon="function" href="../functions/ServerRegistry-register_agent">
    Instance method.
  </Card>

  <Card title="get_registered_agents()" icon="function" href="../functions/ServerRegistry-get_registered_agents">
    Instance method.
  </Card>

  <Card title="cleanup_agent_registrations()" icon="function" href="../functions/ServerRegistry-cleanup_agent_registrations">
    Remove all registrations for an agent ID and clean empty port state.
  </Card>
</CardGroup>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/agent/agent.py#L141">
  `praisonaiagents/agent/agent.py` at line 141
</Card>
