How Task Extraction Works
As your agent converses with users, Acontext analyzes the conversation context to identify planned tasks. For example, when an agent responds with “My plan is: 1. Search for data, 2. Create a project, 3. Deploy”, Acontext extracts these as individual trackable tasks. Key capabilities:- Automatic extraction: Tasks are detected from conversation context without manual tracking
- Status monitoring: Track whether tasks are
pending,running,success, orfailed - Execution insights: See what your agent planned versus what it actually completed
Task Extraction Has a Delay
Task extraction happens asynchronously with a small delay to optimize costs and performance: Batch Processing for Cost Efficiency:- Acontext batches multiple messages together before analyzing them for tasks
- This reduces the number of LLM calls needed for extraction, saving costs
- The system waits a few seconds to collect messages before starting extraction
flush method for blocking and waiting for all the tasks to be extracted.
Quick Start: Test Task Extraction
This example demonstrates how to verify that Acontext correctly extracts tasks from your agent’s messages. You’ll send a conversation where the agent outlines a plan, then retrieve the extracted tasks to confirm they were detected.After running this code, you’ll see the tasks that Acontext automatically extracted from the agent’s planned steps, confirming the extraction is working correctly.
Understanding Task Data
Each extracted task contains adata field with structured information captured from the conversation:
Progress Tracking
Theprogresses array captures the agent’s narrative updates as it works through tasks. Each entry describes what the agent accomplished, written in first-person perspective.
User Preferences
Theuser_preferences array stores specific requirements or preferences the user mentioned for each task during the conversation.
Progress and preferences are appended to tasks as the conversation continues. Early in a conversation, these arrays may be empty or contain only initial entries.
View it in Dashboard
You can view the tasks in the UI by clicking on the “Tasks” tab in the session page.
Task list showing all extracted tasks with their status

Detailed task view showing progress updates and user preferences
Use Cases for Agent Developers
Testing task extraction accuracy
Testing task extraction accuracy
Verify that Acontext correctly extracts tasks from your agent’s conversation patterns. This is essential when developing or updating agent prompts.
Debugging agent behavior
Debugging agent behavior
When your agent isn’t completing work as expected, check extracted tasks to see if the agent is planning steps correctly or if it’s getting stuck at a specific task.
Analyzing agent planning patterns
Analyzing agent planning patterns
Collect task data across multiple sessions to understand how your agent breaks down different types of requests. Use this for optimizing prompts or identifying common failure points.
Reporting agent activity
Reporting agent activity
Generate reports on what agents are planning and executing to share with stakeholders or for compliance purposes.
Best Practices
Poll for extraction
After sending messages, poll the tasks endpoint in a loop until tasks are extracted rather than using fixed delays.
Test extraction patterns
When developing agents, test different conversation patterns to ensure Acontext reliably extracts the tasks you expect.
Monitor execution gaps
Regularly check for tasks stuck in
pending or running status to identify where your agent needs improvement.Analyze completion rates
Track the ratio of
success to failed tasks across sessions to measure and improve agent reliability.