Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Each file in this folder shows an end-to-end flow:
- `github.py`
- `gmail.py`
- `linkedin_scraper.py`
- `olostep.py`
- `postgresql.py`
- `scrapegraphai.py`
- `shell.py`
Expand All @@ -30,7 +31,7 @@ Each file in this folder shows an end-to-end flow:
Install optional tool extras as needed:

```bash
pip install "agentor[exa,git,postgres,github,slack,scrapegraph]"
pip install "agentor[exa,git,postgres,github,slack,scrapegraph,olostep]"
```

For Gmail/Google tool examples:
Expand Down
67 changes: 67 additions & 0 deletions examples/tools/olostep.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
"""End-to-end Agentor example: OlostepTool.

Environment:
export OPENAI_API_KEY=your_llm_key
export OLOSTEP_API_KEY=your_olostep_key

Install olostep extra:
pip install "agentor[olostep]"
"""

import asyncio
import os

import dotenv

from agentor import Agentor
from agentor.tools import OlostepTool

dotenv.load_dotenv()

olostep = OlostepTool(api_key=os.environ.get("OLOSTEP_API_KEY"))

agent = Agentor(
name="Web Research Agent",
model="gpt-5-mini",
tools=[olostep],
instructions=(
"You are a helpful research assistant. "
"Use Olostep tools to scrape websites, search the web, "
"and get AI-powered answers when needed."
),
)


async def main():
"""Showcase core OlostepTool capabilities."""

# 1. Scrape a webpage
print("=== Scrape ===")
result = await agent.arun("Scrape https://example.com and summarize the page.")
print(result.final_output)
print()

# 2. Web search
print("=== Web Search ===")
result = await agent.arun("Search the web for 'Model Context Protocol' and summarize the top results.")
print(result.final_output)
print()

# 3. AI answers
print("=== AI Answers ===")
result = await agent.arun(
"Use the answers tool to find out: Who are the top 3 competitors to Vercel?"
)
print(result.final_output)
print()

# 4. Map a website
print("=== Map Website ===")
result = await agent.arun(
"Discover all URLs on https://docs.celesto.ai related to 'tools' and list them."
)
print(result.final_output)


if __name__ == "__main__":
asyncio.run(main())
2 changes: 2 additions & 0 deletions src/agentor/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from .github import GitHubTool
from .gmail import GmailTool
from .linkedin import LinkedInScraperTool
from .olostep import OlostepTool
from .postgres import PostgreSQLTool
from .shell import ShellTool
from .scrapegraphai import ScrapeGraphAI
Expand All @@ -25,6 +26,7 @@
"GitHubTool",
"GmailTool",
"LinkedInScraperTool",
"OlostepTool",
"PostgreSQLTool",
"ScrapeGraphAI",
"SlackTool",
Expand Down
Loading