Skip to main content

What is an AI Agent?

An AI Agent in xpander is a stateful application with memory that can interact with users through multiple interfaces. Think of it as an intelligent assistant that remembers past conversations and can access various tools to help get work done.

What’s Inside an Agent?

Every agent is built from four core components:

AI Framework

The engine that powers advanced AI capabilities on top of language models

Memory

A PostgreSQL database that stores conversation history and context

AI Model

The large language model (like GPT-5.2) that powers the intelligence

Tools

Built-in capabilities the agent can use to solve problems

Building Your Agent

Creating an agent is quick and easy using the Workbench wizard:
1

Choose Agent Type

Select Serverless (shared infrastructure) or Dedicated (isolated container with full code access)
2

Select Framework

Pick from Agno, Google ADK, OpenAI Agents, LangChain, or Strands (AWS)
3

Configure Settings

Set up session storage, memories, and tool call limits
4

Agent Goes Live

Your agent is deployed and ready to use with default settings

Default Agent Configuration

New agents come pre-configured with:
  • Framework: Agno (Python)
  • Model: OpenAI GPT-5.2
  • Session Storage: Enabled with 10 conversation cycles
  • Built-in Tools:
    • think - Private scratchpad for step-by-step reasoning
    • analyze - Checkpoint to evaluate findings and plan next steps
    • multi_tool_use.parallel - Run multiple tools simultaneously

Configure Your Agent

Once your agent is live, you can customize it using these Workbench tabs:

How to Talk to Your Agent

Chat Interface

Every agent gets its own chat URL with a unique name like:
https://scarlet-penguin.agents.xpander.ai
Chat Interface
The left sidebar shows your conversation threads—each thread is automatically saved in the database and shown in the URL.
Want user authentication? Enable OIDC Configuration in the xpander platform to give each user their own conversation history and secure access to MCP Servers with user-level permissions.

API Access

You can also invoke your agent programmatically:
curl --request POST \
  --url https://api.xpander.ai/v1/agents/<agent-id>/invoke \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <xpander-key>' \
  --data '{
    "input": {
      "text": "Hi",
      "user": {
        "email": "user@acme.com",
        "id": "1234",
        "first_name": "Adam",
        "additional_attributes": {
          "tier": "premium"
        }
      }
    }
  }'
The instructions_override parameter lets you dynamically change the agent’s behavior for a single request.

Check Task Status

Monitor your agent’s activity:
curl --request GET \
  --url 'https://api.xpander.ai/v1/tasks?page=1&per_page=20&agent_id=<agent-id>' \
  --header 'x-api-key: <xpander-key>'
This returns a list of all tasks with their status (pending, completed, error), timestamps, and results.

Setting Clear Goals

Your agent needs measurable goals to work effectively. Here’s what makes a good goal:
Good Goal Example:“Answer user inquiries solely using information explicitly found in the Knowledge Base (KB) or the official documentation available on docs.xpander.ai. Do not utilize external knowledge, internet searches, or assumptions to formulate your response.”
This goal is:
  • Specific - Tells the agent exactly what sources to use
  • Measurable - You can verify if it followed the rule
  • Clear - No ambiguity about what’s allowed
Goal Configuration

Self-Improving Agents

Want your agent to learn and get smarter over time? Enable Agent Memories with agentic management:
1

Enable Agent Memories

Go to your agent settings and turn on “Agent Memories”
2

Choose Agentic Management

Select “Let the agent update and delete its own memories”
3

Add Instructions

Tell your agent what to remember:
Store common product questions and answers in your own memory to become smarter and faster
Memory Settings

How Cultural Knowledge Works

When you enable agentic memory management, your agent gains access to Cultural Knowledge—a shared understanding that helps it make better decisions. The agent automatically learns to:
  • Reference shared norms and best practices
  • Apply principles contextually to each situation
  • Stay consistent with organizational values
  • Extend knowledge when discovering new insights

See It In Action

When your agent learns something new, it will commit it to memory:
Agent Saving Memory
Next time someone asks the same question, the agent already knows the answer:
Instant Answer
Notice: No function calls needed—the agent “just knew” the answer from its memory!

Behind the Scenes

Here’s what happens when the agent uses Cultural Knowledge:
  1. Agent receives question - “Which frameworks does xpander support?”
  2. Checks Cultural Knowledge - Finds stored FAQ about frameworks
  3. Instant response - No need to search or make API calls
  4. Faster & cheaper - Reduced tokens and response time
The Cultural Knowledge gets automatically injected into the agent’s system prompt:
<cultural_knowledge>
Name: Canonical FAQ: xpander supports 5 agent frameworks
Content: xpander supports **5** agent frameworks:
- Agno
- Strands (AWS)
- Google ADK
- OpenAI Agents SDK
- LangChain

Source: https://docs.xpander.ai/user-guide/build/frameworks
</cultural_knowledge>
This allows the agent to answer instantly without making external calls, saving time and money while providing consistent answers across all conversations.

Next Steps