Learning Paths
Build an Agent
Follow the shortest path from provider setup to a promptable Anvia agent.
Use this path when you want to run a model through an Anvia agent with clear instructions and a stable runtime id.
Goal
By the end, you should have:
- a provider client
- a reusable completion model
- an agent with instructions
- one prompt request that returns a final response
Path
- Install Anvia and run the first agent in Getting Started.
- Read Runtime Boundaries to understand which object owns which responsibility.
- Read Clients and Models to choose the provider client and model.
- Read Agent Builder to configure the agent.
- Read Prompt Requests to understand what happens when you call
agent.prompt(...).send().
Minimal Shape
import { AgentBuilder } from "@anvia/core";
import { OpenAIClient } from "@anvia/openai";
const client = new OpenAIClient({ apiKey });
const model = client.completionModel("gpt-5");
const agent = new AgentBuilder("support", model)
.instructions("Answer support questions clearly.")
.build();
const response = await agent.prompt("How do I reset my password?").send();
console.log(response.output);Add Next
| Need | Read |
|---|---|
| Multi-turn conversations | Persist Conversations |
| Application actions | Add Tools |
| Typed responses | Return Structured Output |
| Streaming output | Streaming Events |
