Skip to main content

Quickstart

From zero to a working AI conversation agent in under 5 minutes.

1

Install TrueNorth

Install via pip (Python 3.9+):

bash
pip install truenorth-framework

Or Node.js:

bash
npm install truenorth

Or Go:

bash
go get github.com/amareshhebbar/truenorth/sdk
2

Set your API key

TrueNorth works with any OpenAI-compatible provider:

bash
# OpenAI
export OPENAI_API_KEY=sk-...
# Anthropic
export ANTHROPIC_API_KEY=sk-ant-...
# Local via Ollama — no key needed
3

Create your schema

Create my_agent.yaml:

yaml/my_agent.yaml
id: my_first_agent
persona: "You are a helpful assistant named Alex."
fields:
- name: user_name
type: text
required: true
question: "What's your name?"
- name: email
type: email
question: "What's your email address?"
- name: inquiry
type: text
question: "How can I help you today?"
output_template: inquiry_v1
4

Run the engine

python/main.py
from truenorth import Engine, Schema
schema = Schema.load("my_agent.yaml")
engine = Engine(schema=schema)
session = engine.create_session(user_id="user_123")
while not session.is_complete:
user_input = input(f"Agent: {session.last_message}\nYou: ")
session = engine.chat(session.id, user_input)
print(session.output.json())

Expected output:

json
{
"user_name": "Priya",
"email": "priya@example.com",
"inquiry": "I need help with my subscription",
"_meta":
"turns":
"cost_usd":
"confidence": 0.94
}
}
Next steps
Try the Playground for a live browser demo, or read about the 13-stage engine architecture.