# opencode-python-sdk > Typed Python client for the OpenCode 2.x server API. Install with `pip install opencode-python-sdk`; import as `opencode`. ## Docs - [Home](https://shrijayan.github.io/opencode-python-sdk/) - [Install](https://shrijayan.github.io/opencode-python-sdk/getting-started/) - [Connect to a server](https://shrijayan.github.io/opencode-python-sdk/getting-started/connect/) - [Run a server from Python](https://shrijayan.github.io/opencode-python-sdk/getting-started/server/) - [Use the background service](https://shrijayan.github.io/opencode-python-sdk/getting-started/service/) - [Guide index](https://shrijayan.github.io/opencode-python-sdk/guides/) - [Async](https://shrijayan.github.io/opencode-python-sdk/guides/async/) - [The project directory](https://shrijayan.github.io/opencode-python-sdk/guides/directory/) - [Errors](https://shrijayan.github.io/opencode-python-sdk/guides/errors/) - [Events and streaming](https://shrijayan.github.io/opencode-python-sdk/guides/events/) - [Running agents headless](https://shrijayan.github.io/opencode-python-sdk/guides/headless/) - [Advanced httpx config](https://shrijayan.github.io/opencode-python-sdk/guides/httpx/) - [Logging](https://shrijayan.github.io/opencode-python-sdk/guides/logging/) - [Models and unions](https://shrijayan.github.io/opencode-python-sdk/guides/models/) - [Pagination](https://shrijayan.github.io/opencode-python-sdk/guides/pagination/) - [Plugin RPC](https://shrijayan.github.io/opencode-python-sdk/guides/plugin-rpc/) - [Retries and timeouts](https://shrijayan.github.io/opencode-python-sdk/guides/retries/) - [Sessions and prompts](https://shrijayan.github.io/opencode-python-sdk/guides/sessions/) - [Interactive terminals](https://shrijayan.github.io/opencode-python-sdk/guides/terminals/) - [Testing with the fake server](https://shrijayan.github.io/opencode-python-sdk/guides/testing/) - [Changelog](https://shrijayan.github.io/opencode-python-sdk/project/changelog/) - [Contributing](https://shrijayan.github.io/opencode-python-sdk/project/contributing/) - [How it's built](https://shrijayan.github.io/opencode-python-sdk/project/how-its-built/) - [Security](https://shrijayan.github.io/opencode-python-sdk/project/security/) - [Versioning and releases](https://shrijayan.github.io/opencode-python-sdk/project/versioning/) - [API reference](https://shrijayan.github.io/opencode-python-sdk/reference/) - [Clients](https://shrijayan.github.io/opencode-python-sdk/reference/clients/) - [Shared events and RPC](https://shrijayan.github.io/opencode-python-sdk/reference/events/) - [Exceptions](https://shrijayan.github.io/opencode-python-sdk/reference/exceptions/) - [Pagination and streams](https://shrijayan.github.io/opencode-python-sdk/reference/pagination/) - [Server launcher](https://shrijayan.github.io/opencode-python-sdk/reference/server/) - [Background service](https://shrijayan.github.io/opencode-python-sdk/reference/service/) - [Terminals](https://shrijayan.github.io/opencode-python-sdk/reference/terminals/) - [Helpers and testing](https://shrijayan.github.io/opencode-python-sdk/reference/testing/) ## Optional - [Full docs as one file](https://shrijayan.github.io/opencode-python-sdk/llms-full.txt) - [Method table with HTTP routes](https://github.com/shrijayan/opencode-python-sdk/blob/main/api.md)