ASI:One (ASI1) Builder Skill
ASI:One is an intelligent AI platform by Fetch.ai that unifies LLM inference, agentic orchestration (via the Agentverse marketplace), image generation, tool calling, and Web3-native features behind a single OpenAI-compatible API.
Base URL: https://api.asi1.ai/v1
API Key header: Authorization: Bearer $ASI_ONE_API_KEY
Docs: https://docs.asi1.ai
Models
ASI1 uses one model string that auto-activates capabilities based on context and parameters:
| Model String |
Use When |
asi1 |
Default — full agentic orchestration, Agentverse discovery, all capabilities |
asi1-mini |
Tool calling, image gen, lower latency general use |
asi1-fast |
Tool calling, lowest latency, real-time applications |
asi1-extended |
Tool calling, deep reasoning, complex analysis |
Key specs:
- Context window: up to 128,000 tokens
- Streaming: supported on all models
- OpenAI SDK: fully compatible (swap
base_url only)
Auto-Activated Capabilities (asi1)
| Capability |
What it does |
| Agentic Reasoning |
Discovers & orchestrates agents from Agentverse marketplace |
| Extended Reasoning |
Multi-step analysis, chain-of-thought |
| Fast Inference |
Low-latency path for simple tasks |
| Tool Calling |
External function/API integration |
| Visualization |
Charts & graphs from data |
| Web3 Native |
Smart contracts, tokenomics, on-chain reasoning |
Quick Start
cURL
curl -X POST https://api.asi1.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ASI_ONE_API_KEY" \
-d '{
"model": "asi1",
"messages": [{"role": "user", "content": "What is agentic AI?"}]
}'
TypeScript / Node.js (OpenAI SDK)
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.ASI_ONE_API_KEY!,
baseURL: 'https://api.asi1.ai/v1',
});
const response = await client.chat.completions.create({
model: 'asi1',
messages: [
{ role: 'system', content: 'Be precise and concise.' },
{ role: 'user', content: 'Explain agentic AI.' },
],
temperature: 0.7,
max_tokens: 1000,
});
console.log(response.choices[0].message.content);
Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
api_key="YOUR_ASI_ONE_API_KEY",
base_url="https://api.asi1.ai/v1"
)
response = client.chat.completions.create(
model="asi1",
messages=[
{"role": "system", "content": "Be precise and concise."},
{"role": "user", "content": "What is agentic AI?"}
],
temperature=0.2,
max_tokens=1000,
)
print(response.choices[0].message.content)
Response Structure
Standard OpenAI fields + ASI:One-specific fields:
{
"id": "...",
"choices": [{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "...",
"role": "assistant",
"tool_calls": null
}
}],
"usage": {
"completion_tokens": 149,
"prompt_tokens": 2105,
"total_tokens": 2254
},
"executable_data": [], // ASI:One — agent manifests/tool calls from Agentverse
"intermediate_steps": [], // ASI:One — multi-step reasoning traces
"thought": [], // ASI:One — model reasoning process
"metadata": { "weight_version": "default" }
}
API Parameters Reference
Chat Completions — POST /v1/chat/completions
Headers:
Authorization: Bearer <api_key> (required)
x-session-id: <uuid> (required for agentic model session persistence)
Body:
| Parameter |
Type |
Required |
Notes |
model |
string |
✅ |
asi1, asi1-mini, asi1-fast, asi1-extended |
messages |
array |
✅ |
Standard chat array |
stream |
boolean |
❌ |
SSE streaming |
temperature |
float |
❌ |
0–2 |
max_tokens |
integer |
❌ |
Max response tokens |
top_p |
float |
❌ |
Nucleus sampling |
frequency_penalty |
float |
❌ |
-2.0 to 2.0 |
presence_penalty |
float |
❌ |
-2.0 to 2.0 |
tools |
array |
❌ |
Tool definitions for function calling |
tool_choice |
string/object |
❌ |
"auto", "required", "none", or {type, function} |
parallel_tool_calls |
boolean |
❌ |
Default true |
response_format |
object |
❌ |
For structured JSON output |
web_search |
boolean |
❌ |
Enable built-in web search |
agent_address |
string |
❌ |
Target specific Agentverse agent |
planner_mode |
boolean |
❌ |
Enable ASI Planner |
study_mode |
boolean |
❌ |
Enable study/research mode |
Feature Deep-Dives
For detailed implementation docs, see the reference files:
references/tool-calling.md — Tool definitions, execution cycle, strict mode, parallel calls
references/image-generation.md — Image gen endpoint, sizes, prompting, batch patterns
references/agentic-llm.md — Session management, async polling, Agentverse integration
references/structured-data.md — JSON schema output, Pydantic/LangChain patterns
references/agent-chat-protocol.md — uagents, Chat Protocol, inter-agent messaging (Python)
references/openai-compat.md — Full OpenAI SDK compatibility, LangChain, streaming, web search
Read the relevant reference file(s) based on what the user needs to build.
TypeScript Patterns (Quick Reference)
Streaming
const stream = await client.chat.completions.create({
model: 'asi1',
messages: [{ role: 'user', content: 'Tell me about Web3' }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content ?? '');
}
Session-based Agentic Calls
import { v4 as uuidv4 } from 'uuid';
const sessionId = uuidv4();
const response = await client.chat.completions.create(
{
model: 'asi1',
messages: [{ role: 'user', content: 'Check flight arrivals at Delhi airport' }],
stream: true,
},
{
headers: { 'x-session-id': sessionId },
}
);
Web Search Enabled
const response = await client.chat.completions.create({
model: 'asi1',
messages: [{ role: 'user', content: 'Latest AI research 2025' }],
// @ts-ignore — ASI:One-specific extra body field
extra_body: { web_search: true },
});
Getting an API Key
- Sign up at https://asi1.ai/
- Navigate to the Developer Section
- Click Create New → name it → save the key
Set it as env var: ASI_ONE_API_KEY=your_key_here
Key Gotchas
- Always use
x-session-id header when using asi1 model for multi-turn agentic tasks
- Tool calling is supported on
asi1-mini, asi1-fast, asi1-extended (not base asi1 alone)
- Image generation uses a separate endpoint:
POST /v1/image/generate
- Structured output: set
strict: true AND additionalProperties: false AND list all fields in required
- Tool result
content must be JSON-stringified (a string, not an object)
- Preserve exact
tool_call_id values when sending tool results back
- For async Agentverse agent tasks: poll with follow-up messages ("Any update?") until response changes
1---2name: asi1-builder3description: Complete reference and build guide for ASI:One (ASI1) — the AI platform by Fetch.ai built for agentic, Web3-native applications. Use this skill IMMEDIATELY and ALWAYS when the user mentions ASI1, ASI:One, Fetch.ai AI API, building with ASI1, integrating ASI:One, asking about ASI1 models, tool calling with ASI1, ASI1 image generation, ASI1 agentic LLM, Agentverse, uagents, Agent Chat Protocol, structured output with ASI1, or OpenAI-compatible wrappers for ASI1. Also trigger when the user says things like "use ASI1 instead of OpenAI", "build an app with ASI:One", "ASI1 API", or references docs.asi1.ai. This skill covers everything needed to build production apps - setup, all models, all API features, tool calling, image gen, agentic orchestration, structured data, session management, streaming, LangChain integration, uagents / Agent Chat Protocol, and TypeScript/Node.js patterns.4---56# ASI:One (ASI1) Builder Skill78**ASI:One** is an intelligent AI platform by [Fetch.ai](https://fetch.ai/) that unifies LLM inference, agentic orchestration (via the [Agentverse marketplace](https://agentverse.ai/)), image generation, tool calling, and Web3-native features behind a single OpenAI-compatible API.910Base URL: `https://api.asi1.ai/v1`11API Key header: `Authorization: Bearer $ASI_ONE_API_KEY`12Docs: https://docs.asi1.ai1314---1516## Models1718ASI1 uses **one model string** that auto-activates capabilities based on context and parameters:1920| Model String | Use When |21|---|---|22| `asi1` | Default — full agentic orchestration, Agentverse discovery, all capabilities |23| `asi1-mini` | Tool calling, image gen, lower latency general use |24| `asi1-fast` | Tool calling, lowest latency, real-time applications |25| `asi1-extended` | Tool calling, deep reasoning, complex analysis |2627**Key specs:**28- Context window: up to **128,000 tokens**29- Streaming: supported on all models30- OpenAI SDK: fully compatible (swap `base_url` only)3132### Auto-Activated Capabilities (asi1)3334| Capability | What it does |35|---|---|36| Agentic Reasoning | Discovers & orchestrates agents from Agentverse marketplace |37| Extended Reasoning | Multi-step analysis, chain-of-thought |38| Fast Inference | Low-latency path for simple tasks |39| Tool Calling | External function/API integration |40| Visualization | Charts & graphs from data |41| Web3 Native | Smart contracts, tokenomics, on-chain reasoning |4243---4445## Quick Start4647### cURL48```bash49curl -X POST https://api.asi1.ai/v1/chat/completions \50 -H "Content-Type: application/json" \51 -H "Authorization: Bearer $ASI_ONE_API_KEY" \52 -d '{53 "model": "asi1",54 "messages": [{"role": "user", "content": "What is agentic AI?"}]55 }'56```5758### TypeScript / Node.js (OpenAI SDK)59```typescript60import OpenAI from 'openai';6162const client = new OpenAI({63 apiKey: process.env.ASI_ONE_API_KEY!,64 baseURL: 'https://api.asi1.ai/v1',65});6667const response = await client.chat.completions.create({68 model: 'asi1',69 messages: [70 { role: 'system', content: 'Be precise and concise.' },71 { role: 'user', content: 'Explain agentic AI.' },72 ],73 temperature: 0.7,74 max_tokens: 1000,75});7677console.log(response.choices[0].message.content);78```7980### Python (OpenAI SDK)81```python82from openai import OpenAI8384client = OpenAI(85 api_key="YOUR_ASI_ONE_API_KEY",86 base_url="https://api.asi1.ai/v1"87)8889response = client.chat.completions.create(90 model="asi1",91 messages=[92 {"role": "system", "content": "Be precise and concise."},93 {"role": "user", "content": "What is agentic AI?"}94 ],95 temperature=0.2,96 max_tokens=1000,97)98print(response.choices[0].message.content)99```100101---102103## Response Structure104105Standard OpenAI fields + ASI:One-specific fields:106107```json108{109 "id": "...",110 "choices": [{111 "finish_reason": "stop",112 "index": 0,113 "message": {114 "content": "...",115 "role": "assistant",116 "tool_calls": null117 }118 }],119 "usage": {120 "completion_tokens": 149,121 "prompt_tokens": 2105,122 "total_tokens": 2254123 },124 "executable_data": [], // ASI:One — agent manifests/tool calls from Agentverse125 "intermediate_steps": [], // ASI:One — multi-step reasoning traces126 "thought": [], // ASI:One — model reasoning process127 "metadata": { "weight_version": "default" }128}129```130131---132133## API Parameters Reference134135### Chat Completions — `POST /v1/chat/completions`136137**Headers:**138- `Authorization: Bearer <api_key>` (required)139- `x-session-id: <uuid>` (required for agentic model session persistence)140141**Body:**142143| Parameter | Type | Required | Notes |144|---|---|---|---|145| `model` | string | ✅ | `asi1`, `asi1-mini`, `asi1-fast`, `asi1-extended` |146| `messages` | array | ✅ | Standard chat array |147| `stream` | boolean | ❌ | SSE streaming |148| `temperature` | float | ❌ | 0–2 |149| `max_tokens` | integer | ❌ | Max response tokens |150| `top_p` | float | ❌ | Nucleus sampling |151| `frequency_penalty` | float | ❌ | -2.0 to 2.0 |152| `presence_penalty` | float | ❌ | -2.0 to 2.0 |153| `tools` | array | ❌ | Tool definitions for function calling |154| `tool_choice` | string/object | ❌ | `"auto"`, `"required"`, `"none"`, or `{type, function}` |155| `parallel_tool_calls` | boolean | ❌ | Default true |156| `response_format` | object | ❌ | For structured JSON output |157| `web_search` | boolean | ❌ | Enable built-in web search |158| `agent_address` | string | ❌ | Target specific Agentverse agent |159| `planner_mode` | boolean | ❌ | Enable ASI Planner |160| `study_mode` | boolean | ❌ | Enable study/research mode |161162---163164## Feature Deep-Dives165166For detailed implementation docs, see the reference files:167168- **`references/tool-calling.md`** — Tool definitions, execution cycle, strict mode, parallel calls169- **`references/image-generation.md`** — Image gen endpoint, sizes, prompting, batch patterns170- **`references/agentic-llm.md`** — Session management, async polling, Agentverse integration171- **`references/structured-data.md`** — JSON schema output, Pydantic/LangChain patterns172- **`references/agent-chat-protocol.md`** — uagents, Chat Protocol, inter-agent messaging (Python)173- **`references/openai-compat.md`** — Full OpenAI SDK compatibility, LangChain, streaming, web search174175Read the relevant reference file(s) based on what the user needs to build.176177---178179## TypeScript Patterns (Quick Reference)180181### Streaming182```typescript183const stream = await client.chat.completions.create({184 model: 'asi1',185 messages: [{ role: 'user', content: 'Tell me about Web3' }],186 stream: true,187});188189for await (const chunk of stream) {190 process.stdout.write(chunk.choices[0]?.delta?.content ?? '');191}192```193194### Session-based Agentic Calls195```typescript196import { v4 as uuidv4 } from 'uuid';197198const sessionId = uuidv4();199200const response = await client.chat.completions.create(201 {202 model: 'asi1',203 messages: [{ role: 'user', content: 'Check flight arrivals at Delhi airport' }],204 stream: true,205 },206 {207 headers: { 'x-session-id': sessionId },208 }209);210```211212### Web Search Enabled213```typescript214const response = await client.chat.completions.create({215 model: 'asi1',216 messages: [{ role: 'user', content: 'Latest AI research 2025' }],217 // @ts-ignore — ASI:One-specific extra body field218 extra_body: { web_search: true },219});220```221222---223224## Getting an API Key2252261. Sign up at https://asi1.ai/2272. Navigate to the Developer Section2283. Click **Create New** → name it → save the key229230Set it as env var: `ASI_ONE_API_KEY=your_key_here`231232---233234## Key Gotchas235236- Always use `x-session-id` header when using `asi1` model for multi-turn agentic tasks237- Tool calling is supported on `asi1-mini`, `asi1-fast`, `asi1-extended` (not base `asi1` alone)238- Image generation uses a **separate endpoint**: `POST /v1/image/generate`239- Structured output: set `strict: true` AND `additionalProperties: false` AND list all fields in `required`240- Tool result `content` must be JSON-stringified (a string, not an object)241- Preserve exact `tool_call_id` values when sending tool results back242- For async Agentverse agent tasks: poll with follow-up messages ("Any update?") until response changes