Tasks
A Task is a discrete assignment or job for an Agent to execute. Tasks contain a description of the work, expected output, optional input requirements, and references to tools or data.
Represents a discrete assignment or objective for an Agent.
Source code in fsdk/anote-sdk.py
__init__(instructions, files_uploaded=None, examples=None, expected_output='', agent=None)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
instructions |
str
|
The main prompt or directive for the Agent. |
required |
files_uploaded |
list of str
|
File paths or IDs relevant to the Task (e.g., PDFs, CSVs). |
None
|
examples |
list
|
Few-shot examples or reference data. |
None
|
expected_output |
str
|
Form or content of the final result (e.g., 'Return a markdown summary'). |
''
|
agent |
Agent
|
The Agent assigned to this Task. |
None
|
Source code in fsdk/anote-sdk.py
Tasks Fields
- instructions: The main prompt or directive (e.g.,
"Summarize Q3 earnings"
). - files_uploaded: File paths or IDs relevant to the Task (e.g.,
["report_Q3_2023.pdf"]
). - examples: Optional few-shot examples or reference data.
- expected_output: The form or content of the final result (e.g.,
"Return a markdown summary"
). - agent: The Agent to which this Task is assigned.
Example 1:
from anote_agents import Task
task = Task(
instructions="Summarize the Q3 earnings from the attached PDF.",
files_uploaded=["report_Q3_2023.pdf"],
examples=["In Q2, we saw a 12% increase in revenue..."],
expected_output="Short text summary with key figures.",
agent=None
)
Examples of Task Usage
A task could be used to do things such as scheduling Find the best meeting times with {participant_count} participants.
or research Gather references on quantum computing breakthroughs since 2020.
If using structured outputs, define output_json for validation.
Example 2: