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

# Develop

> Develop your agent logic on your machine

This is how you develop your agent:

<Steps>
  <Step title="Edit">
    Edit your agent code in `handle_query.py`

    ```python theme={null}
    class Handler:
      async def handle_query(
          self,
          prompt: str,
          session_id: str | None = None,
          **kwargs,
      ) -> AsyncIterator[Message]:
          opts = ClaudeAgentOptions(...)
          async for message in query(prompt=prompt, options=opts):
              # ... your agent logic
              yield message
    ```
  </Step>

  <Step title="Add dependencies (optional)">
    Add any additional Python packages using `uv`:

    ```bash theme={null}
    uv add requests  # Example: adding the requests library
    ```

    <Info>
      You can install `uv` by following the instructions in the [uv documentation](https://docs.astral.sh/uv/).
    </Info>
  </Step>

  <Step title="Test">
    ```bash theme={null}
    sb0 agent run --prompt "Hello"
    ```

    <Tip>
      Use `--session-id` to continue conversations across queries:

      ```bash theme={null}
      sb0 agent run --prompt "What is 2+2?" --session-id "test-id"
      sb0 agent run --prompt "What did I ask?" --session-id "test-id"
      ```
    </Tip>
  </Step>

  <Step title="Iterate" icon="repeat">
    Repeat until satisfied.
  </Step>
</Steps>

## Adding Dependencies
