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

# Olostep + Nanobot Integration

> Use Olostep as a web-search backend for nanobot's web_search tool.

Olostep adds a search backend for nanobot's `web_search` tool, giving agents AI-friendly web answers and source links without requiring you to build a custom retrieval pipeline.

## Features

<CardGroup cols={2}>
  <Card title="AI Answers" icon="sparkles">
    Return a concise answer plus supporting source links.
  </Card>

  <Card title="Simple Setup" icon="plug">
    Enable the provider with a single config value and an API key.
  </Card>

  <Card title="Optional Dependency" icon="boxes-stacked">
    Install Olostep only when you need it.
  </Card>

  <Card title="Proxy Support" icon="network-wired">
    Route requests through `tools.web.proxy` when required.
  </Card>

  <Card title="Safe Fallbacks" icon="shield-halved">
    Falls back to DuckDuckGo when no Olostep key is available.
  </Card>

  <Card title="Normalized Output" icon="list">
    Uses the same web-search output formatting as the other providers.
  </Card>
</CardGroup>

## Installation

<CodeGroup>
  ```bash pip theme={null}
  pip install "nanobot-ai[olostep]"
  ```

  ```bash poetry theme={null}
  poetry add "nanobot-ai[olostep]"
  ```
</CodeGroup>

<Note>
  If you manage dependencies manually, the underlying package is `olostep>=0.1.0`.
</Note>

## Setup

Set your API key with either an environment variable or your nanobot config.

### Environment variable

```bash theme={null}
export OLOSTEP_API_KEY="your-api-key"
```

### Config file

Add this to `~/.nanobot/config.json`:

```json theme={null}
{
  "tools": {
    "web": {
      "search": {
        "provider": "olostep",
        "apiKey": "YOUR_OLOSTEP_API_KEY"
      }
    }
  }
}
```

### Optional proxy

If your environment requires a proxy, configure it once under `tools.web.proxy`:

```json theme={null}
{
  "tools": {
    "web": {
      "proxy": "http://127.0.0.1:7890"
    }
  }
}
```

## Available Tools / Methods

### `web_search`

Use Olostep by setting `tools.web.search.provider` to `olostep`.

#### Parameters

<ParamField path="provider" type="string">
  Set to `olostep` to enable this integration. Default: `duckduckgo`
</ParamField>

<ParamField path="apiKey" type="string">
  Olostep API key. You can also use `OLOSTEP_API_KEY` environment variable.
</ParamField>

<ParamField path="baseUrl" type="string">
  Not used by Olostep. Kept for config consistency.
</ParamField>

<ParamField path="maxResults" type="integer" default="5">
  Results per search, from 1–10.
</ParamField>

<ParamField path="timeout" type="integer" default="30">
  Search timeout in seconds.
</ParamField>

<ParamField path="proxy" type="string or null">
  Proxy URL configured under `tools.web`.
</ParamField>

<CodeGroup>
  ```json Basic Setup theme={null}
  {
    "tools": {
      "web": {
        "search": {
          "provider": "olostep",
          "apiKey": "YOUR_OLOSTEP_API_KEY"
        }
      }
    }
  }
  ```

  ```json With Environment Variable theme={null}
  {
    "tools": {
      "web": {
        "search": {
          "provider": "olostep"
        }
      }
    }
  }
  ```

  ```bash theme={null}
  export OLOSTEP_API_KEY="your-api-key"
  ```

  ```json With Proxy theme={null}
  {
    "tools": {
      "web": {
        "proxy": "http://127.0.0.1:7890",
        "search": {
          "provider": "olostep",
          "apiKey": "YOUR_OLOSTEP_API_KEY"
        }
      }
    }
  }
  ```
</CodeGroup>

## Full Agent Examples

### Example 1: Quick Research Assistant

```python theme={null}
import asyncio

from nanobot import Nanobot


async def main() -> None:
    bot = Nanobot.from_config()
    result = await bot.run(
        "Use web search to summarize the latest Olostep SDK capabilities and cite sources.",
        session_key="olostep-research",
    )
    print(result.content)


asyncio.run(main())
```

### Example 2: Research Workflow in a Workspace

```python theme={null}
import asyncio

from nanobot import Nanobot


async def main() -> None:
    bot = Nanobot.from_config(workspace="/home/user/projects/research")
    result = await bot.run(
        "Find recent documentation for programmatic web access tools and list the key tradeoffs.",
        session_key="olostep-workspace-demo",
    )
    print(result.content)


asyncio.run(main())
```

### Example 3: Proxy-Aware Search Setup

```python theme={null}
import asyncio

from nanobot import Nanobot


async def main() -> None:
    bot = Nanobot.from_config(workspace="/home/user/projects/research")
    result = await bot.run(
        "Search for implementation notes about web-scraping SDKs and summarize the differences.",
        session_key="olostep-proxy-demo",
    )
    print(result.content)


asyncio.run(main())
```

## Configuration / Options

* Set `tools.web.search.provider` to `olostep` to enable the integration.
* Keep `tools.web.enable` as `true` if you want both `web_search` and `web_fetch`.
* Set `tools.web.enable` to `false` to disable all built-in web tools.
* Set `tools.web.proxy` if your environment requires outbound traffic through a proxy.
* Leave `provider` unset if you want the default DuckDuckGo fallback behavior.

### Fallback behavior

If Olostep is selected but no API key is available, nanobot falls back to DuckDuckGo instead of failing hard.

## Specialized Features

* **Source-aware answers** — Olostep returns a response plus source links.
* **Shared formatting** — results are rendered in the same normalized search output used by the other providers.
* **No hard dependency** — the provider is imported behind a `try/except` guard, so nanobot still works without Olostep installed.
* **Proxy-aware transport** — `tools.web.proxy` is applied to the underlying HTTP client used by the integration.

## Pricing

Olostep pricing is managed by Olostep directly and may change over time. Check your Olostep account dashboard for current plans, quotas, and usage costs.

## Support

* **PyPI**: [pypi.org/project/olostep](https://pypi.org/project/olostep/)
* **Documentation**: [docs.olostep.com](https://docs.olostep.com)
* **Homepage**: [olostep.com](https://www.olostep.com)
* **GitHub repository**: [github.com/olostep-api/olostep-py](https://github.com/olostep-api/olostep-py)
* **GitHub issues**: [github.com/olostep-api/olostep-py/issues](https://github.com/olostep-api/olostep-py/issues)
* **Email**: [team@olostep.com](mailto:team@olostep.com)

## Related Resources

<CardGroup cols={2}>
  <Card title="Answers API" icon="question" href="/features/answers/answers">
    Learn about the Answers endpoint powering this integration
  </Card>

  <Card title="Python SDK" icon="python" href="/sdks/python">
    Explore the Olostep Python SDK
  </Card>

  <Card title="Search Results" icon="magnifying-glass" href="/searches/searches">
    Understand web search capabilities
  </Card>

  <Card title="API Documentation" icon="book" href="/get-started/authentication">
    Browse the full API reference
  </Card>
</CardGroup>
