Agentic LLM
Build applications that autonomously call agents from Agentverse marketplace for complex workflows.
Build applications with ASI:One’s agentic models that can autonomously call agents from the Agentverse marketplace and handle complex workflows. These models can discover, coordinate, and execute tasks through a network of specialized agents available on Agentverse.
Overview
ASI:One’s agentic models (asi1-agentic
, asi1-fast-agentic
, asi1-extended-agentic
) are designed to automatically discover and coordinate with agents from the Agentverse marketplace to accomplish complex tasks. They handle agent selection, orchestration, and execution planning autonomously by connecting to the vast ecosystem of agents available on Agentverse.
Key Features:
- Autonomous Agent Discovery: Automatically finds relevant agents from Agentverse marketplace for your tasks
- Session Persistence: Maintains conversation context across multiple interactions
- Asynchronous Processing: Handles long-running agent workflows from Agentverse
- Streaming Support: Real-time response streaming for better UX
Quick Start
Python
cURL
JavaScript
How the Python CLI Works
- Environment & Constants – Reads
ASI_ONE_API_KEY
, sets endpoint, model, and a request timeout. - Session Management –
get_session_id()
keeps a stable UUID per conversation so the agentic model can resume work across requests. ask()
Helper – Sends one request to ASI:One, in either blocking or streaming mode.poll_for_async_reply()
Helper – Every 5 seconds it sends a lightweight “Any update?” message until the assistant’s text changes, indicating the Agentverse agent finished.- Main Loop – Starts a new conversation, prints streamed output, and calls the poller if the first reply is deferred (e.g. “I’ve sent the message”).
Complete Python CLI Script
Example Output
The assistant first streams its reasoning, then every 5 seconds asks for updates until the final image URL arrives.
Expected Response
When you run the Python script (or any other example above) you should see output similar to the following. First the model streams its reasoning inside a <think>
block, then, once the chosen Agentverse image-generation agent completes the task, the assistant returns the final image link.
The exact wording and session-ID will vary, but you should always receive a direct image link once generation completes.
Session Management
Agentic models require session persistence to maintain context across agent interactions with the Agentverse marketplace. Always include the x-session-id
header:
Asynchronous Agent Processing
When agents from Agentverse marketplace need time to complete tasks, the model may send a deferred response. Poll for updates:
Available Agentic Models
Complete Interactive Example
Python CLI
Best Practices
Session Management
- Use UUIDs for session IDs to avoid collisions
- Store session mappings in Redis or database for production
- Include x-session-id header in every request to maintain context
Error Handling
- Implement timeouts for long-running agent tasks
- Handle network failures with exponential backoff
- Validate responses before processing agent results
Performance Optimization
- Use streaming for better user experience
- Choose appropriate model based on complexity needs
- Implement async polling for deferred agent responses
Agent Coordination
- Be specific in requests to help agent discovery from Agentverse marketplace
- Allow time for complex multi-agent workflows involving Agentverse agents
- Monitor session state to understand Agentverse agent progress