Skip to main content

Overview

The DeerFlowClient provides methods to query and update configuration, manage skills, handle file uploads, and access agent-produced artifacts.

Models

list_models()

List available models from configuration.
list[dict]
List of model info dictionaries.

Example

get_model(name)

Get a specific model’s configuration by name.
str
required
Model name.
dict | None
Model info dict, or None if not found.

Skills

list_skills(enabled_only)

List available skills.
bool
default:"False"
If True, only return enabled skills.
list[dict]
List of skill info dictionaries.

get_skill(name)

Get a specific skill by name.
str
required
Skill name.

update_skill(name, enabled)

Update a skill’s enabled status.
str
required
Skill name.
bool
required
New enabled status.
Calls reset_agent() internally - the agent will be recreated on next use.
Raises:
  • ValueError - If skill not found
  • OSError - If config file cannot be written

install_skill(skill_path)

Install a skill from a .skill archive (ZIP).
str | Path
required
Path to the .skill file.
dict
Raises:
  • FileNotFoundError - If file does not exist
  • ValueError - If file is invalid or skill already exists

Memory

get_memory()

Get current memory data.
dict
Memory data dict with version and facts keys.

reload_memory()

Reload memory data from file, forcing cache invalidation.

get_memory_config()

Get memory system configuration.
dict

get_memory_status()

Get memory status: config + current data.

MCP Configuration

get_mcp_config()

Get MCP server configurations.
dict[str, dict]
Dict mapping server name to config.

update_mcp_config(mcp_servers)

Update MCP server configurations.
dict[str, dict]
required
Dict mapping server name to config dict. Each value should contain keys like enabled, type, command, args, env, url, etc.
Writes to extensions_config.json and calls reset_agent() - the agent will be recreated on next use.
Raises:
  • FileNotFoundError - If config file cannot be located
  • OSError - If config file cannot be written

File Uploads

upload_files(thread_id, files)

Upload local files into a thread’s uploads directory.
str
required
Target thread ID.
list[str | Path]
required
List of local file paths to upload.
For PDF, PPT, Excel, and Word files, they are also converted to Markdown automatically.
dict
Raises:
  • FileNotFoundError - If any file does not exist

list_uploads(thread_id)

List files in a thread’s uploads directory.
str
required
Thread ID.
dict

delete_upload(thread_id, filename)

Delete a file from a thread’s uploads directory.
str
required
Thread ID.
str
required
Filename to delete.
Raises:
  • FileNotFoundError - If file does not exist
  • PermissionError - If path traversal is detected

Artifacts

get_artifact(thread_id, path)

Read an artifact file produced by the agent.
str
required
Thread ID.
str
required
Virtual path (e.g., “mnt/user-data/outputs/file.txt”).
tuple[bytes, str]
Tuple of (file_bytes, mime_type).
Raises:
  • FileNotFoundError - If artifact does not exist
  • ValueError - If path is invalid
  • PermissionError - If path traversal is detected

Agent Management

reset_agent()

Force the internal agent to be recreated on the next call.
Use this after:
  • External changes to memory
  • Skill installations
  • Configuration updates that should be reflected in the system prompt or tool set
This is automatically called by update_skill() and update_mcp_config().

Complete Example

See Also

  • Chat - For simple request/response
  • Streaming - For real-time events
  • Overview - For initialization options