Simple Agent
A minimal Orca project with one model, one tool, and one agent.
Source (main.oc)
orca
model gpt4 {
provider = "openai"
model_name = "gpt-4o"
temperature = 0.7
}
tool search {
name = "web_search"
desc = "Search the web for current information"
}
agent researcher {
model = gpt4
persona = "
You are a research assistant.
You search the web for information and
provide well-sourced answers.
Always cite your sources.
"
tools = [search]
}Build
bash
orca buildGenerated output (build/main.py)
python
# Auto-generated by Orca compiler — do not edit.
from langchain_openai import ChatOpenAI
# === variables ===
# === models ===
gpt4 = ChatOpenAI(model="gpt-4o", temperature=0.7) # main.oc:1Generated dependencies (build/pyproject.toml)
toml
[project]
name = "orca-build"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
"langchain-core",
"langchain-openai",
]What's happening
- The
modelblock creates aChatOpenAIinstance with GPT-4o and temperature 0.7. - The
toolblock defines a web search tool the agent can use. - The
agentblock wires the model and tool together with a persona that describes the agent's behavior.