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

Terminal
pip install opentine

Provider 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.

Terminal
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 for opentine.models.anthropic.Anthropic.
  • [openai] installs the OpenAI SDK for opentine.models.openai.OpenAI.
  • [google] installs google-genai for opentine.models.google.Google.
  • [compat] installs the OpenAI SDK for the compatibility wrappers in opentine.models.compat.

Ollama

Ollama support uses the core HTTP client dependency directly. There is no separate Ollama Python extra.

Terminal
# Ollama uses the core httpx dependency, so no Python extra is needed.
pip install opentine
ollama pull llama3.1

Using uv

uv is a good way to create a fresh project and pin dependencies.

Terminal
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.

Terminal
# 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"
AdapterEnvironment
AnthropicANTHROPIC_API_KEY
OpenAIOPENAI_API_KEY, optional OPENAI_BASE_URL
GoogleGOOGLE_API_KEY
OpenAI-compatible wrappersProvider-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.
OllamaOLLAMA_HOST, defaulting to http://localhost:11434

Verify the Installation

Check that the package imports, then run a small provider smoke with your configured credentials.

Terminal
python -c "from opentine.core import FORMAT_VERSION; print(FORMAT_VERSION)"
verify.py
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 .tine file.
  • Review Model Adapters for provider status and compatibility targets.
  • Read tine run to wrap external CLI harnesses.