Skip to main content

Attributes

The Task system is configured through the Task class, which provides the following attributes:

Core Attributes

Tool Configuration

Guardrail Configuration

Cache Configuration

Vector Search Configuration

Runtime Status Attributes

Properties

The Task class provides the following read-only properties:

Methods

Tool Management

Cache Management

Task Lifecycle

Utility Methods

Internal Attributes

The following attributes are internal and typically not set by users:
  • _response: Internal storage for task response
  • _context_formatted: Internal formatted context string
  • _tool_calls: Internal list of tool calls
  • _cache_manager: Internal cache manager instance (set by Agent)
  • _cache_hit: Internal flag for cache hit status
  • _original_input: Internal storage for original input description
  • _last_cache_entry: Internal storage for last cache entry
  • _run_id: Internal run ID for task continuation
  • _task_todos: Internal todo list for task planning
  • task_id_: Internal task ID (use task_id property)
  • task_usage_id_: Internal usage-scope tag (use task_usage_id property)
  • agent: Internal reference to agent instance

Configuration Examples

Task with Structured Response Format

Task with Caching

Task with Guardrail

Task with Context and Attachments

Task with Vector Search Configuration

Accessing Task Properties