open-agent-search 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- open_agent_search-1.0.0/.dockerignore +24 -0
- open_agent_search-1.0.0/.env.example +11 -0
- open_agent_search-1.0.0/.github/instructions/copilot.instructions.md +23 -0
- open_agent_search-1.0.0/.github/workflows/ci.yml +43 -0
- open_agent_search-1.0.0/.github/workflows/docs.yml +32 -0
- open_agent_search-1.0.0/.gitignore +52 -0
- open_agent_search-1.0.0/.prettierignore +3 -0
- open_agent_search-1.0.0/.python-version +1 -0
- open_agent_search-1.0.0/CONTRIBUTING.md +72 -0
- open_agent_search-1.0.0/DEVELOPER.md +135 -0
- open_agent_search-1.0.0/Dockerfile +37 -0
- open_agent_search-1.0.0/LICENSE +21 -0
- open_agent_search-1.0.0/PKG-INFO +153 -0
- open_agent_search-1.0.0/README.md +124 -0
- open_agent_search-1.0.0/docker-compose.yml +31 -0
- open_agent_search-1.0.0/docs/api/endpoints.md +228 -0
- open_agent_search-1.0.0/docs/api/mcp-tools.md +124 -0
- open_agent_search-1.0.0/docs/assets/logo.svg +17 -0
- open_agent_search-1.0.0/docs/contributing.md +77 -0
- open_agent_search-1.0.0/docs/deployment/docker.md +77 -0
- open_agent_search-1.0.0/docs/deployment/vercel.md +87 -0
- open_agent_search-1.0.0/docs/getting-started/installation.md +66 -0
- open_agent_search-1.0.0/docs/getting-started/quickstart.md +77 -0
- open_agent_search-1.0.0/docs/index.md +225 -0
- open_agent_search-1.0.0/docs/mcp/claude-code.md +54 -0
- open_agent_search-1.0.0/docs/mcp/claude-desktop.md +46 -0
- open_agent_search-1.0.0/docs/mcp/cursor.md +40 -0
- open_agent_search-1.0.0/docs/mcp/index.md +94 -0
- open_agent_search-1.0.0/docs/mcp/openclaw.md +149 -0
- open_agent_search-1.0.0/docs/mcp/other-clients.md +46 -0
- open_agent_search-1.0.0/docs/mcp/vscode.md +59 -0
- open_agent_search-1.0.0/docs/mcp/windsurf.md +22 -0
- open_agent_search-1.0.0/mkdocs.yml +120 -0
- open_agent_search-1.0.0/open_agent_search/__init__.py +3 -0
- open_agent_search-1.0.0/open_agent_search/__main__.py +5 -0
- open_agent_search-1.0.0/open_agent_search/app.py +127 -0
- open_agent_search-1.0.0/open_agent_search/config.py +104 -0
- open_agent_search-1.0.0/open_agent_search/controllers/__init__.py +1 -0
- open_agent_search-1.0.0/open_agent_search/controllers/book.py +49 -0
- open_agent_search-1.0.0/open_agent_search/controllers/content.py +172 -0
- open_agent_search-1.0.0/open_agent_search/controllers/image.py +80 -0
- open_agent_search-1.0.0/open_agent_search/controllers/news.py +68 -0
- open_agent_search-1.0.0/open_agent_search/controllers/text.py +68 -0
- open_agent_search-1.0.0/open_agent_search/controllers/unified.py +155 -0
- open_agent_search-1.0.0/open_agent_search/controllers/video.py +77 -0
- open_agent_search-1.0.0/open_agent_search/mcp.py +245 -0
- open_agent_search-1.0.0/open_agent_search/models/__init__.py +1 -0
- open_agent_search-1.0.0/open_agent_search/models/schemas.py +77 -0
- open_agent_search-1.0.0/open_agent_search/routes/__init__.py +1 -0
- open_agent_search-1.0.0/open_agent_search/routes/book.py +41 -0
- open_agent_search-1.0.0/open_agent_search/routes/content.py +64 -0
- open_agent_search-1.0.0/open_agent_search/routes/image.py +69 -0
- open_agent_search-1.0.0/open_agent_search/routes/news.py +53 -0
- open_agent_search-1.0.0/open_agent_search/routes/text.py +53 -0
- open_agent_search-1.0.0/open_agent_search/routes/unified.py +61 -0
- open_agent_search-1.0.0/open_agent_search/routes/video.py +71 -0
- open_agent_search-1.0.0/open_agent_search/utils/__init__.py +8 -0
- open_agent_search-1.0.0/open_agent_search/utils/async_helpers.py +57 -0
- open_agent_search-1.0.0/open_agent_search/utils/url_validator.py +106 -0
- open_agent_search-1.0.0/public/favicon.ico +0 -0
- open_agent_search-1.0.0/pyproject.toml +74 -0
- open_agent_search-1.0.0/scripts/check_docs.ps1 +54 -0
- open_agent_search-1.0.0/scripts/run_load_tests.ps1 +73 -0
- open_agent_search-1.0.0/tests/__init__.py +0 -0
- open_agent_search-1.0.0/tests/conftest.py +17 -0
- open_agent_search-1.0.0/tests/locustfile.py +178 -0
- open_agent_search-1.0.0/tests/test_api.py +35 -0
- open_agent_search-1.0.0/tests/test_content_routes.py +248 -0
- open_agent_search-1.0.0/uv.lock +2961 -0
- open_agent_search-1.0.0/vercel.json +16 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Ignore Python/build artifacts in Docker image
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
.venv/
|
|
8
|
+
venv/
|
|
9
|
+
.env
|
|
10
|
+
.env.*
|
|
11
|
+
.git/
|
|
12
|
+
.github/
|
|
13
|
+
.idea/
|
|
14
|
+
.vscode/
|
|
15
|
+
*.swp
|
|
16
|
+
Thumbs.db
|
|
17
|
+
.DS_Store
|
|
18
|
+
tests/
|
|
19
|
+
scripts/
|
|
20
|
+
htmlcov/
|
|
21
|
+
.coverage
|
|
22
|
+
.pytest_cache/
|
|
23
|
+
.mypy_cache/
|
|
24
|
+
locust_report_*.html
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
# description: Describe when these instructions should be loaded
|
|
3
|
+
applyTo: "**" # when provided, instructions will automatically be added to the request context when the pattern matches an attached file
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Open Agent Search (OAS)
|
|
7
|
+
|
|
8
|
+
Our project, **Open Agent Search**, is the definitive open-source search solution for the AI agent ecosystem. Our mission is to provide **unfiltered, agent-neutral access to the world's knowledge**.
|
|
9
|
+
|
|
10
|
+
## Philosophy & Manners
|
|
11
|
+
|
|
12
|
+
- **Independence**: We are not bound to any single agent framework (like OpenClaw, LangChain, or AutoGen). We stand independently as the sensory organ for AI.
|
|
13
|
+
- **Privacy & Accuracy**: We prioritize privacy (leveraging DuckDuckGo) and accuracy above all else.
|
|
14
|
+
- **Universal Access**: We support all deployment methods (HTTP, MCP, Pip, Docker, Vercel) to ensure any agent, anywhere, can see the world.
|
|
15
|
+
- **Respect for the Ecosystem**: While we support specific frameworks (like OpenClaw via `openclaw-search`), we maintain our own identity as a foundational tool, not just a plugin.
|
|
16
|
+
|
|
17
|
+
## Technical Context
|
|
18
|
+
|
|
19
|
+
- We use **uv** for managing the virtual environment, running the server, and running tests.
|
|
20
|
+
- When suggesting commands, prefer `uv run` over direct python execution.
|
|
21
|
+
- We support OpenClaw integration natively.
|
|
22
|
+
|
|
23
|
+
Keep this philosophy in mind while coding. We are building the eyes of the AI.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- name: Install uv
|
|
15
|
+
uses: astral-sh/setup-uv@v7
|
|
16
|
+
with:
|
|
17
|
+
version: ">=0.6.0"
|
|
18
|
+
enable-cache: true
|
|
19
|
+
- name: Install Python
|
|
20
|
+
run: uv python install
|
|
21
|
+
- name: Install dependencies
|
|
22
|
+
run: uv sync --locked --dev
|
|
23
|
+
- run: uv run ruff check .
|
|
24
|
+
- run: uv run ruff format --check .
|
|
25
|
+
|
|
26
|
+
test:
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
needs: lint
|
|
29
|
+
strategy:
|
|
30
|
+
matrix:
|
|
31
|
+
python-version: ["3.12", "3.13"]
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v4
|
|
34
|
+
- name: Install uv
|
|
35
|
+
uses: astral-sh/setup-uv@v7
|
|
36
|
+
with:
|
|
37
|
+
version: ">=0.6.0"
|
|
38
|
+
python-version: ${{ matrix.python-version }}
|
|
39
|
+
enable-cache: true
|
|
40
|
+
- name: Install dependencies
|
|
41
|
+
run: uv sync --locked --all-extras --dev
|
|
42
|
+
- name: Run tests
|
|
43
|
+
run: uv run pytest -v
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Deploy Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- "docs/**"
|
|
8
|
+
- "mkdocs.yml"
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
deploy:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Install uv
|
|
21
|
+
uses: astral-sh/setup-uv@v7
|
|
22
|
+
with:
|
|
23
|
+
version: ">=0.6.0"
|
|
24
|
+
|
|
25
|
+
- name: Set up Python
|
|
26
|
+
run: uv python install 3.12
|
|
27
|
+
|
|
28
|
+
- name: Install docs dependencies
|
|
29
|
+
run: uv sync --group docs
|
|
30
|
+
|
|
31
|
+
- name: Build & deploy to GitHub Pages
|
|
32
|
+
run: uv run mkdocs gh-deploy --force
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
*.egg
|
|
7
|
+
*.egg-info/
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
*.whl
|
|
11
|
+
|
|
12
|
+
# Virtual environments
|
|
13
|
+
.venv/
|
|
14
|
+
venv/
|
|
15
|
+
ENV/
|
|
16
|
+
|
|
17
|
+
# IDE
|
|
18
|
+
.vscode/
|
|
19
|
+
.idea/
|
|
20
|
+
*.swp
|
|
21
|
+
*.swo
|
|
22
|
+
*~
|
|
23
|
+
|
|
24
|
+
# Environment variables
|
|
25
|
+
.env
|
|
26
|
+
.env.local
|
|
27
|
+
.env.production
|
|
28
|
+
|
|
29
|
+
# OS files
|
|
30
|
+
Thumbs.db
|
|
31
|
+
.DS_Store
|
|
32
|
+
|
|
33
|
+
# Testing & coverage
|
|
34
|
+
htmlcov/
|
|
35
|
+
.coverage
|
|
36
|
+
.coverage.*
|
|
37
|
+
coverage.xml
|
|
38
|
+
*.cover
|
|
39
|
+
.pytest_cache/
|
|
40
|
+
.mypy_cache/
|
|
41
|
+
|
|
42
|
+
# Locust reports
|
|
43
|
+
locust_report_*.html
|
|
44
|
+
|
|
45
|
+
# Deployment
|
|
46
|
+
.vercel/
|
|
47
|
+
|
|
48
|
+
# Python build
|
|
49
|
+
.Python
|
|
50
|
+
|
|
51
|
+
# MkDocs
|
|
52
|
+
site/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Contributing to Open Agent Search
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in contributing! Here's how to get started.
|
|
4
|
+
|
|
5
|
+
## Development Setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Clone the repository
|
|
9
|
+
git clone https://github.com/Jayanth-MKV/open-agent-search.git
|
|
10
|
+
cd open-agent-search
|
|
11
|
+
|
|
12
|
+
# Install uv (if you haven't already)
|
|
13
|
+
# https://docs.astral.sh/uv/getting-started/installation/
|
|
14
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
15
|
+
|
|
16
|
+
# Sync all dependencies (including dev tools)
|
|
17
|
+
uv sync --dev
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Running the Server
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
uv run open-agent-search
|
|
24
|
+
|
|
25
|
+
# With hot reload for development
|
|
26
|
+
uv run uvicorn open_agent_search.app:app --reload --host 0.0.0.0 --port 8000
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Running Tests
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
uv run pytest
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Code Style
|
|
36
|
+
|
|
37
|
+
- Follow [PEP 8](https://peps.python.org/pep-0008/) conventions.
|
|
38
|
+
- Use type hints for all function signatures.
|
|
39
|
+
- Format code with [Ruff](https://docs.astral.sh/ruff/):
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
uv run ruff check .
|
|
43
|
+
uv run ruff format .
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Pull Request Process
|
|
47
|
+
|
|
48
|
+
1. Fork the repo and create your branch from `main`.
|
|
49
|
+
2. Add or update tests for any new functionality.
|
|
50
|
+
3. Make sure `uv run ruff check .` and `uv run pytest` pass.
|
|
51
|
+
4. Update the README if you changed any public API or behaviour.
|
|
52
|
+
5. Open a pull request with a clear description of your changes.
|
|
53
|
+
|
|
54
|
+
## Adding Dependencies
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Add a runtime dependency
|
|
58
|
+
uv add <package>
|
|
59
|
+
|
|
60
|
+
# Add a dev-only dependency
|
|
61
|
+
uv add --group dev <package>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Reporting Issues
|
|
65
|
+
|
|
66
|
+
- Use [GitHub Issues](https://github.com/Jayanth-MKV/open-agent-search/issues).
|
|
67
|
+
- Include steps to reproduce, expected behaviour, and actual behaviour.
|
|
68
|
+
- Mention your Python version and OS.
|
|
69
|
+
|
|
70
|
+
## License
|
|
71
|
+
|
|
72
|
+
By contributing, you agree that your contributions will be licensed under the [MIT License](LICENSE).
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Developer TLDR
|
|
2
|
+
|
|
3
|
+
Quick reference for repo owner commands. No fluff.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Setup
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
uv sync --dev --group docs # everything: runtime + dev + docs
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Day-to-Day
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Run server (pick one)
|
|
19
|
+
uv run open-agent-search # production
|
|
20
|
+
uv run uvicorn open_agent_search.app:app --reload --host 0.0.0.0 --port 8000 # dev w/ hot reload
|
|
21
|
+
uv run oas-mcp # MCP stdio only
|
|
22
|
+
|
|
23
|
+
# Lint & format
|
|
24
|
+
uv run ruff check . # lint
|
|
25
|
+
uv run ruff check --fix . # lint + auto-fix
|
|
26
|
+
uv run ruff format . # format
|
|
27
|
+
uv run ruff format --check . # format dry-run (CI uses this)
|
|
28
|
+
|
|
29
|
+
# Tests
|
|
30
|
+
uv run pytest -v # unit tests
|
|
31
|
+
uv run pytest -x # stop on first failure
|
|
32
|
+
|
|
33
|
+
# Load tests
|
|
34
|
+
uv run locust -f tests/locustfile.py --host=http://localhost:8000 # interactive UI
|
|
35
|
+
uv run locust -f tests/locustfile.py --host=http://localhost:8000 \
|
|
36
|
+
--users 50 --spawn-rate 5 --run-time 2m --headless # headless
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Docs (GitHub Pages)
|
|
42
|
+
|
|
43
|
+
Site: `https://jayanth-mkv.github.io/open-agent-search/`
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Install docs deps (first time)
|
|
47
|
+
uv sync --group docs
|
|
48
|
+
|
|
49
|
+
# Local preview (live reload at http://127.0.0.1:8000)
|
|
50
|
+
uv run mkdocs serve
|
|
51
|
+
|
|
52
|
+
# Build (output → site/)
|
|
53
|
+
uv run mkdocs build
|
|
54
|
+
|
|
55
|
+
# Validate built HTML (checks grid card layout + emoji rendering)
|
|
56
|
+
.\scripts\check_docs.ps1
|
|
57
|
+
|
|
58
|
+
# Manual deploy to gh-pages branch
|
|
59
|
+
uv run mkdocs gh-deploy --force
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Auto-deploy:** pushing to `main` with changes in `docs/` or `mkdocs.yml` triggers the `Deploy Docs` workflow. It builds and pushes to the `gh-pages` branch automatically.
|
|
63
|
+
|
|
64
|
+
> **⚠ Do not run a markdown formatter on `docs/`.**
|
|
65
|
+
> Material for MkDocs grid cards require ` ---` separators with 4-space indentation inside list items. Auto-formatters (Prettier, Markdown All in One) collapse this to 2-space + `***`, breaking the card layout. VS Code format-on-save is disabled for `.md` files via `.vscode/settings.json`, and `.prettierignore` excludes `docs/`. Always run `.\scripts\check_docs.ps1` after editing docs.
|
|
66
|
+
|
|
67
|
+
**First-time GitHub Pages setup:**
|
|
68
|
+
|
|
69
|
+
1. Go to repo **Settings → Pages**
|
|
70
|
+
2. Source: **Deploy from a branch**
|
|
71
|
+
3. Branch: **gh-pages** / `/(root)`
|
|
72
|
+
4. Save
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## CI Workflows
|
|
77
|
+
|
|
78
|
+
### `ci.yml` — Lint + Test
|
|
79
|
+
|
|
80
|
+
| Trigger | `push` / `pull_request` to `main` |
|
|
81
|
+
| ------------ | ---------------------------------------------------------- |
|
|
82
|
+
| **lint** job | `ruff check .` + `ruff format --check .` |
|
|
83
|
+
| **test** job | `pytest -v` on Python 3.12 & 3.13 (runs after lint passes) |
|
|
84
|
+
|
|
85
|
+
### `docs.yml` — Deploy Docs
|
|
86
|
+
|
|
87
|
+
| Trigger | `push` to `main` (only `docs/**`, `mkdocs.yml`) + manual `workflow_dispatch` |
|
|
88
|
+
| -------------- | ---------------------------------------------------------------------------- |
|
|
89
|
+
| **deploy** job | `mkdocs gh-deploy --force` → pushes built site to `gh-pages` branch |
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Docker
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
docker compose up -d # build + run
|
|
97
|
+
docker compose logs -f # tail logs
|
|
98
|
+
docker compose down # stop
|
|
99
|
+
docker compose watch # dev mode (live sync)
|
|
100
|
+
docker build -t open-agent-search . # manual build
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Dependencies
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
uv add <pkg> # add runtime dep
|
|
109
|
+
uv add --group dev <pkg> # add dev dep
|
|
110
|
+
uv add --group docs <pkg> # add docs dep
|
|
111
|
+
uv lock # regenerate lockfile
|
|
112
|
+
uv sync --locked # install from lockfile (CI mode)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Publish to PyPI
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
uv build # builds wheel + sdist → dist/
|
|
121
|
+
uv publish # upload to PyPI (needs token)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Key URLs (local)
|
|
127
|
+
|
|
128
|
+
| URL | What |
|
|
129
|
+
| ---------------------------- | --------------------------- |
|
|
130
|
+
| http://localhost:8000 | API root |
|
|
131
|
+
| http://localhost:8000/docs | Swagger UI |
|
|
132
|
+
| http://localhost:8000/redoc | ReDoc |
|
|
133
|
+
| http://localhost:8000/health | Health check |
|
|
134
|
+
| http://localhost:8000/ai/mcp | MCP endpoint |
|
|
135
|
+
| http://127.0.0.1:8000 | mkdocs serve (docs preview) |
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
FROM python:3.12-slim AS builder
|
|
2
|
+
|
|
3
|
+
# Install uv
|
|
4
|
+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
|
5
|
+
|
|
6
|
+
WORKDIR /app
|
|
7
|
+
|
|
8
|
+
# Enable bytecode compilation for faster startup
|
|
9
|
+
ENV UV_COMPILE_BYTECODE=1
|
|
10
|
+
# Use copy mode (cache mount is on a separate filesystem)
|
|
11
|
+
ENV UV_LINK_MODE=copy
|
|
12
|
+
|
|
13
|
+
# Install dependencies first (better layer caching)
|
|
14
|
+
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
15
|
+
--mount=type=bind,source=uv.lock,target=uv.lock \
|
|
16
|
+
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
|
17
|
+
uv sync --locked --no-install-project --no-dev
|
|
18
|
+
|
|
19
|
+
# Copy the project into the image
|
|
20
|
+
COPY . /app
|
|
21
|
+
|
|
22
|
+
# Install the project itself
|
|
23
|
+
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
24
|
+
uv sync --locked --no-dev --no-editable
|
|
25
|
+
|
|
26
|
+
# --- Runtime stage ---
|
|
27
|
+
FROM python:3.12-slim
|
|
28
|
+
|
|
29
|
+
# Copy the virtual environment from the builder
|
|
30
|
+
COPY --from=builder /app/.venv /app/.venv
|
|
31
|
+
|
|
32
|
+
# Place the venv on PATH so entry points are available
|
|
33
|
+
ENV PATH="/app/.venv/bin:$PATH"
|
|
34
|
+
|
|
35
|
+
EXPOSE 8000
|
|
36
|
+
|
|
37
|
+
CMD ["open-agent-search"]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Jayanth-MKV
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: open-agent-search
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A production-ready metasearch API and MCP server powered by DuckDuckGo
|
|
5
|
+
Project-URL: Homepage, https://github.com/Jayanth-MKV/open-agent-search
|
|
6
|
+
Project-URL: Documentation, https://jayanth-mkv.github.io/open-agent-search/
|
|
7
|
+
Project-URL: Repository, https://github.com/Jayanth-MKV/open-agent-search
|
|
8
|
+
Project-URL: Issues, https://github.com/Jayanth-MKV/open-agent-search/issues
|
|
9
|
+
Author: Jayanth-MKV
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: agent-search,duckduckgo,fastapi,mcp,open-agent-search,openclaw
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Framework :: FastAPI
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
|
|
21
|
+
Requires-Python: >=3.12
|
|
22
|
+
Requires-Dist: beautifulsoup4>=4.14.3
|
|
23
|
+
Requires-Dist: ddgs>=9.8.0
|
|
24
|
+
Requires-Dist: fastapi[standard]>=0.121.0
|
|
25
|
+
Requires-Dist: fastmcp>=2.14.1
|
|
26
|
+
Requires-Dist: httpx>=0.28.1
|
|
27
|
+
Requires-Dist: slowapi>=0.1.9
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# Open Agent Search (OAS)
|
|
31
|
+
|
|
32
|
+
[](LICENSE)
|
|
33
|
+
[](https://www.python.org/)
|
|
34
|
+
[](https://fastapi.tiangolo.com/)
|
|
35
|
+
[](https://jayanth-mkv.github.io/open-agent-search/)
|
|
36
|
+
|
|
37
|
+
The **sensory organ** for the AI agent ecosystem. An independent, privacy-first search layer providing unfiltered access to the world's knowledge via [MCP](https://modelcontextprotocol.io/) and HTTP API.
|
|
38
|
+
|
|
39
|
+
> **Open Agent Search is an independent foundational tool.** We are not bound to any single agent framework but support them all (including OpenClaw via `openclaw-search`). Our mission is accuracy, speed, and universal access.
|
|
40
|
+
|
|
41
|
+
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FJayanth-MKV%2Fopen-agent-search&project-name=open-agent-search&repository-name=open-agent-search)
|
|
42
|
+
|
|
43
|
+
> **[Read the full documentation →](https://jayanth-mkv.github.io/open-agent-search/)**
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Quick Start
|
|
48
|
+
|
|
49
|
+
### Zero-install (MCP)
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Works instantly — no clone or install needed
|
|
53
|
+
uvx --from open-agent-search oas-mcp
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Install & Run
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Install from PyPI
|
|
60
|
+
uv pip install open-agent-search
|
|
61
|
+
|
|
62
|
+
# Start the HTTP API + MCP server
|
|
63
|
+
open-agent-search
|
|
64
|
+
# → http://localhost:8000 (API)
|
|
65
|
+
# → http://localhost:8000/ai/mcp (MCP)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### From Source
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
git clone https://github.com/Jayanth-MKV/open-agent-search.git
|
|
72
|
+
cd open-agent-search
|
|
73
|
+
uv sync
|
|
74
|
+
uv run open-agent-search
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Docker
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
docker compose up -d
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## What's Included
|
|
86
|
+
|
|
87
|
+
| Feature | Description |
|
|
88
|
+
| ----------------------- | ------------------------------------------------------------------------------ |
|
|
89
|
+
| **REST API** | 8 search endpoints (text, images, videos, news, books, unified, content fetch) |
|
|
90
|
+
| **MCP Server** | 8 tools accessible via stdio or HTTP — works with every major AI coding client |
|
|
91
|
+
| **OpenClaw Compatible** | Works as an OpenClaw skill via stdio MCP transport |
|
|
92
|
+
| **Rate Limiting** | Per-IP rate limits with configurable dev/prod profiles |
|
|
93
|
+
| **One-Click Deploy** | Deploy to Vercel in seconds |
|
|
94
|
+
| **Docker** | Multi-stage Dockerfile + Compose with health checks |
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## MCP Client Setup
|
|
99
|
+
|
|
100
|
+
> **[Full setup guides →](https://jayanth-mkv.github.io/open-agent-search/mcp/)**
|
|
101
|
+
|
|
102
|
+
Add to any MCP client with `uvx` — zero install:
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"mcpServers": {
|
|
107
|
+
"open-agent-search": {
|
|
108
|
+
"command": "uvx",
|
|
109
|
+
"args": ["--from", "open-agent-search", "oas-mcp"]
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Guides available for: **Claude Desktop** · **Claude Code** · **Cursor** · **VS Code** · **Windsurf** · **OpenClaw** · [and more](https://jayanth-mkv.github.io/open-agent-search/mcp/other-clients/)
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## API Endpoints
|
|
120
|
+
|
|
121
|
+
| Endpoint | Method | Description |
|
|
122
|
+
| ----------------------------- | ------ | ---------------------------------- |
|
|
123
|
+
| `/api/search/text` | GET | Web / text search |
|
|
124
|
+
| `/api/search/images` | GET | Image search |
|
|
125
|
+
| `/api/search/videos` | GET | Video search |
|
|
126
|
+
| `/api/search/news` | GET | News search |
|
|
127
|
+
| `/api/search/books` | GET | Book search |
|
|
128
|
+
| `/api/search/all` | GET | Unified parallel search |
|
|
129
|
+
| `/api/content/fetch` | GET | Fetch & extract content from a URL |
|
|
130
|
+
| `/api/content/fetch-multiple` | POST | Fetch content from multiple URLs |
|
|
131
|
+
| `/ai/mcp` | — | MCP server endpoint |
|
|
132
|
+
|
|
133
|
+
> **[Full API reference →](https://jayanth-mkv.github.io/open-agent-search/api/endpoints/)**
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Documentation
|
|
138
|
+
|
|
139
|
+
- [Installation](https://jayanth-mkv.github.io/open-agent-search/getting-started/installation/)
|
|
140
|
+
- [Quick Start](https://jayanth-mkv.github.io/open-agent-search/getting-started/quickstart/)
|
|
141
|
+
- [MCP Integration](https://jayanth-mkv.github.io/open-agent-search/mcp/)
|
|
142
|
+
- [API Reference](https://jayanth-mkv.github.io/open-agent-search/api/endpoints/)
|
|
143
|
+
- [Docker Deployment](https://jayanth-mkv.github.io/open-agent-search/deployment/docker/)
|
|
144
|
+
- [Vercel Deployment](https://jayanth-mkv.github.io/open-agent-search/deployment/vercel/)
|
|
145
|
+
- [Contributing](https://jayanth-mkv.github.io/open-agent-search/contributing/)
|
|
146
|
+
|
|
147
|
+
## Contributing
|
|
148
|
+
|
|
149
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
150
|
+
|
|
151
|
+
## License
|
|
152
|
+
|
|
153
|
+
[MIT](LICENSE)
|