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
- Tool Agent
- RAG Agent
- Document Extractor Agent
Currently, only these tools are supported out of the box:
multiply
: Basic calculator multiplication functionsemantic_search
: Document search using semantic similaritymcp
: 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
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
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?"
}
]
}
RAG (Retrieval-Augmented Generation) agents are perfect for document search and Q&A:
{
"name": "DocumentHelper",
"description": "Document assistant",
"agentType": "rag",
"config": {
"query_engine": {
"llm_model_id": "amazon.nova-micro-v1:0"
},
"retriever": {
"filter_value": {},
"hx_env_id": "7DFF8DA1-6375-4581-95BB-36E5317D4B9D",
"limit": 25,
"retriever_type": "snowflake_semantic_api",
"semantic_api_url": "https://discovery-dev.dev.experience.hyland.com/semantic/similar-chunks"
}
}
}
To query the RAG agent:
POST /v1/agents/{agent_id}/invoke-rag
{
"messages": [
{
"role": "user",
"content": "What's in our HR policy about vacation days?"
}
],
"filterValue": {}
}
Document Extractor agents excel at extracting structured information:
{
"name": "DataExtractor",
"description": "Information extraction agent",
"agentType": "document_extractor",
"config": {
"prompt": "Extract structured information from the text as JSON.",
"output_schema": {
"title": "Person",
"type": "object",
"properties": {
"name": {"type": "string", "description": "Full name"},
"age": {"type": "integer", "description": "Age"}
}
},
"examples": [
{
"input": "Sarah is 28 years old.",
"extraction": {"name": "Sarah", "age": 28}
}
],
"max_tokens": 4080,
"model_id": "us.anthropic.claude-3-5-sonnet-20241022-v2:0"
}
}
To use the Document Extractor agent:
POST /v1/agents/{agent_id}/invoke-document-extractor
{
"text": "John Smith is a 42-year-old software engineer."
}
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.
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.
Streaming endpoints for Tool agents (invoke-agent-stream
) are currently under development. Document Extractor Agents won't support streaming