Documentation / @agentick/agent / Agent
Function: Agent() ​
Agent(
props):ReactElement
Defined in: agent.tsx:164
High-level agent component that renders common boilerplate.
Renders in order:
- Model configuration (with model options)
- System prompt section (if provided)
- Tool components
- KnobBinding children (each calls useKnob, renders null)
- Declarative sections (from sections prop)
- User's children
- <Knobs /> — aggregated knob section + set_knob tool
- Timeline (with optional budget props), unless timeline===false
Parameters ​
props ​
Returns ​
ReactElement
Examples ​
tsx
function MyAgent() {
return (
<Agent
system="You are a helpful assistant."
model={openai("gpt-4o")}
tools={[SearchTool, CalculatorTool]}
knobs={{ mode: knob("quick", { description: "Research depth", options: ["quick", "deep"] }) }}
temperature={0.7}
tokenBudget={{ maxTokens: 8000, headroom: 500 }}
>
<MyCustomSection />
</Agent>
);
}tsx
createAgent({
system: "You are helpful.",
tools: [SearchTool],
knobs: { mode: knob("quick", { description: "Depth" }) },
});