Installation
opentine 0.1.x beta requires Python 3.11 or higher. The base install includes the graph primitives, policy defaults, built-in tools, Ollama adapter, harness wrappers, and the tine CLI.
Basic Install
pip install opentineProvider Extras
Cloud provider SDKs are optional. Install only the SDKs you need. Kimi, DeepSeek, Qwen, GLM, Groq, Together, Mistral, and local OpenAI-compatible endpoints use the [compat] extra, which installs the OpenAI SDK.
pip install "opentine[anthropic]"
pip install "opentine[openai]"
pip install "opentine[google]"
pip install "opentine[compat]"
# All cloud SDK extras currently packaged by opentine:
pip install "opentine[all]"[anthropic]installs the Anthropic SDK foropentine.models.anthropic.Anthropic.[openai]installs the OpenAI SDK foropentine.models.openai.OpenAI.[google]installsgoogle-genaiforopentine.models.google.Google.[compat]installs the OpenAI SDK for the compatibility wrappers inopentine.models.compat.
Ollama
Ollama support uses the core HTTP client dependency directly. There is no separate Ollama Python extra.
# Ollama uses the core httpx dependency, so no Python extra is needed.
pip install opentine
ollama pull llama3.1Using uv
uv is a good way to create a fresh project and pin dependencies.
uv init my-agent
cd my-agent
uv add "opentine[anthropic]"Environment Variables
Provider adapters read their default credentials from environment variables. Keep credentials out of source files and saved examples.
# Anthropic
export ANTHROPIC_API_KEY="sk-ant-..."
# OpenAI and OpenAI-compatible endpoints
export OPENAI_API_KEY="sk-..."
export OPENAI_BASE_URL="https://api.example.com/v1"
# Google
export GOOGLE_API_KEY="AIza..."
# Ollama local server
export OLLAMA_HOST="http://localhost:11434"| Adapter | Environment |
|---|---|
| Anthropic | ANTHROPIC_API_KEY |
| OpenAI | OPENAI_API_KEY, optional OPENAI_BASE_URL |
GOOGLE_API_KEY | |
| OpenAI-compatible wrappers | Provider-specific keys such as KIMI_API_KEY, DEEPSEEK_API_KEY, QWEN_API_KEY, GLM_API_KEY, GROQ_API_KEY, TOGETHER_API_KEY, or MISTRAL_API_KEY. |
| Ollama | OLLAMA_HOST, defaulting to http://localhost:11434 |
Verify the Installation
Check that the package imports, then run a small provider smoke with your configured credentials.
python -c "from opentine.core import FORMAT_VERSION; print(FORMAT_VERSION)"1from opentine import Agent
2from opentine.models.anthropic import Anthropic
3
4agent = Agent(model=Anthropic("claude-sonnet-4-20250514"))
5run = agent.run_sync("Say hello")
6run.save("hello.tine")
7
8print(run.status.value)
9print(run.id[:12])
Next Steps
- Follow the Quickstart to save and verify your first
.tinefile. - Review Model Adapters for provider status and compatibility targets.
- Read tine run to wrap external CLI harnesses.