Quick Start
Task Data
Each task contains:task_description: What the task isstatus:pending,running,success, orfailedprogresses: Agent’s progress updatesuser_preferences: User requirements mentioned
View in Dashboard


Automatic task extraction from agent conversations
import os
from acontext import AcontextClient
client = AcontextClient(api_key=os.getenv("ACONTEXT_API_KEY"))
session = client.sessions.create()
# Store conversation — each user request becomes a separate task
messages = [
{"role": "user", "content": "Research iPhone 15 specs and summarize the key features"},
{"role": "assistant", "content": "Here are the key iPhone 15 specs:\n- A16 chip, 48MP camera, USB-C..."},
{"role": "user", "content": "Now create a comparison table with iPhone 14"},
{"role": "assistant", "content": "| Feature | iPhone 14 | iPhone 15 |\n|---|---|---|\n| Chip | A15 | A16 |..."},
]
for msg in messages:
client.sessions.store_message(session_id=session.id, blob=msg, format="openai")
# Wait for extraction
client.sessions.flush(session.id)
# Get tasks — one per user request
tasks = client.sessions.get_tasks(session.id)
for task in tasks.items:
print(f"Task #{task.order}: {task.data.task_description} | Status: {task.status}")
task_description: What the task isstatus: pending, running, success, or failedprogresses: Agent’s progress updatesuser_preferences: User requirements mentionedfor task in tasks.items:
print(f"Task: {task.data.task_description}")
if task.data.progresses:
for p in task.data.progresses:
print(f" Progress: {p}")
if task.data.user_preferences:
for pref in task.data.user_preferences:
print(f" Preference: {pref}")

