Skip to main content

Quickstart Guide

This guide will help you get started with creating and using different types of agents in our platform.

Prerequisites

  • Valid authentication token
  • Access to the API endpoints
  • Appropriate permissions (Consumer for GET, Solution Builder for POST)

Creating Your First Agent

Available Tools

Currently, only these tools are supported out of the box:

  • multiply: Basic calculator multiplication function
  • semantic_search: Document search using semantic similarity
  • mcp: Document management tools (Local Setup Only)
  • structured_output: Force JSON output.

Tool agents can perform specific tasks using predefined tools. Here are common examples:

Basic Calculator Agent

{
"name": "Calculator",
"description": "Math assistant",
"agentType": "tool",
"config": {
"agent": {
"tools": [
{
"tool_type": "function",
"name": "multiply",
"description": "Multiplies two numbers",
"func_name": "multiply"
}
],
"llm_model_id": "anthropic.claude-3-haiku-20240307-v1:0",
"system_prompt": "You are a helpful assistant with access to various tools.",
"inference_config": {
"max_tokens": 4000
}
}
}
}

Semantic Search Agent

{
"name": "DocumentSearcher",
"description": "Document search assistant",
"agentType": "tool",
"config": {
"agent": {
"tools": [
{
"tool_type": "rag",
"name": "semantic_search",
"description": "Searches for Information on a document RAG Database using Semantic Search",
"func_name": "semantic_search",
"filter_value": {}
}
],
"llm_model_id": "anthropic.claude-3-haiku-20240307-v1:0",
"system_prompt": "You are a helpful assistant with access to various tools.",
"inference_config": {
"max_tokens": 4000
}
}
}
}

Structured Output Agent

Experimental Feature

Structured Output on Tool Agent is currently an experimental feature. The API and functionality may change in future releases.

{
"name": "PersonExtractor",
"description": "Extracts structured information about people",
"agentType": "tool",
"config": {
"agent": {
"tools": [
{
"tool_type": "structured_output",
"name": "structured_output",
"description": "Extracts structured information about a person from text",
"output_schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Full name of the person"
},
"age": {
"type": "integer",
"description": "Age of the person"
},
"occupation": {
"type": "string",
"description": "Person's job or profession"
}
},
"required": ["name"]
}
}
],
"llm_model_id": "anthropic.claude-3-sonnet-20240229-v1:0",
"system_prompt": "You are a helpful assistant specialized in extracting structured information about people from text.",
"inference_config": {
"max_tokens": 4000,
"temperature": 0.1
}
}
}
}

Example usage:

POST /v1/agents/{agent_id}/invoke-agent
{
"messages": [
{
"role": "user",
"content": "John Doe is a 35-year-old software engineer"
}
]
}

Expected response:

{
"name": "John Doe",
"age": 35,
"occupation": "software engineer"
}

Agent connected with MCP

Local Setup Only

For now we only tested this locally. This example requires a local MCP server setup. See cin-mcp-alfresco for server setup.

{
"name": "Alfresco Claim Assistant",
"description": "Agent specialized in Alfresco Content Services interactions",
"agentType": "tool",
"config": {
"agent": {
"tools": [
{
"tool_type": "mcp",
"name": "alfresco_document_manager",
"description": "Manages documents in Alfresco Content Services",
"mcp_server_url_or_command": "http://host.docker.internal:3000/sse",
"allowed_tools": [
"get_repository_info",
"add_tag_to_document",
"get_repository_info",
"create_pdf_report",
"read_document_by_title"
]
}
],
"llm_model_id": "anthropic.claude-3-haiku-20240307-v1:0",
"system_prompt": "You are an Alfresco Content Services specialist assistant. You can help with interacting with different documents. You will be handling Report Claims. The user will ask you questions about documents, you can read and write documents. To write documents you will have a tool to write them as PDF's only Write documents when the user explicitly asks you to write a report / document. You can also add tags to documents. So if the user asks you to set a Report Claim to for example to_review use the tags tools to do it.",
"inference_config": {
"max_tokens": 4000,
"temperature": 0.7
}
}
}
}

To use with any tool agent just pass in the message dict.

POST /v1/agents/{agent_id}/invoke-agent
{
"messages": [
{
"role": "user",
"content": "What's 3x5?"

}
]
}

Streaming Responses

Currently, only RAG agents support streaming responses through the /v1/agents/{agent_id}/invoke-rag-stream endpoint. Streaming support for Tool agents is under development and will be available soon.

tip

When using the streaming endpoint with RAG agents, make sure your client supports streaming connections. Tools like Swagger UI may not display streaming responses correctly - consider using cURL or a streaming-compatible client instead.

note

Streaming endpoints for Tool agents (invoke-agent-stream) are currently under development. Document Extractor Agents won't support streaming