Anvia
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

  1. Install Anvia and run the first agent in Getting Started.
  2. Read Runtime Boundaries to understand which object owns which responsibility.
  3. Read Clients and Models to choose the provider client and model.
  4. Read Agent Builder to configure the agent.
  5. 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

NeedRead
Multi-turn conversationsPersist Conversations
Application actionsAdd Tools
Typed responsesReturn Structured Output
Streaming outputStreaming Events