Tools overview
Agent tools are ordinary Python callables. Agent reads each function's name, signature, type annotations, and docstring to build the provider-facing schema.
1from opentine import tool_schema
2from opentine.tools.search import search
3
4print(tool_schema(search))
5# {"name": "search", "description": "Search the web...", "input_schema": {...}}
Built-in modules
- Search and web: pluggable search, protected text fetch, and raw responses.
- Filesystem: rooted read, write, edit, and directory listing.
- Shell and Python: subprocess execution behind explicit policies.
Pass callables directly
1from opentine import Agent
2from opentine.models.anthropic import Anthropic
3from opentine.tools.search import search
4from opentine.tools.web import fetch
5from opentine.tools.fs import read
6
7agent = Agent(
8 model=Anthropic("claude-sonnet-5"),
9 tools=[search, fetch, read],
10)
The built-in shell and Python execution functions are disabled by default. Enable them with scoped policy wrappers before exposing them to a model. Network fetch also blocks private, loopback, link-local, reserved, and multicast destinations by default.
Policies and subprocess limits are resource boundaries, not an operating-system sandbox. Keep host-owned policy arguments inside wrappers rather than exposing them in model-controlled schemas.
Schema limits
The schema helper maps common Python annotations into provider-facing JSON schema. Keep tool signatures narrow, validate free-form values inside the callable, and treat recorded model or tool output as untrusted input.