Agent class wraps the VectorShift agent platform: declarative tools, typed inputs/outputs, and multi-turn conversations via Session.
Prerequisites: Installed SDK · API key set · Python 3.10+.
Mental model
- An agent is an LLM + tools + instructions + typed I/O.
- Two flavours: Functional (single call, you get outputs back — designed to be invoked from inside a Pipeline) and Conversational (multi-turn, runs behind a
Session). Pick withtype=AgentType.FUNCTIONALorAgentType.CONVERSATIONAL. - Tools are declared with
Tool+ToolInput. ~200 integration tools are auto-generated undervectorshift.agent.tools. - Every method has an async variant (
anew,arun,acreate_session, …).
Quick start
Functional vs Conversational
| Functional | Conversational | |
|---|---|---|
| Shape | One call, one result | Multi-turn, streaming events |
| Entry point | agent.run({...}) — typically called from inside a Pipeline node | agent.create_session() then session.send() / session.listen() |
| Use when | You want autonomous tool selection as one step of a larger pipeline (extraction, classification, summarisation, multi-tool research) | You’re building a chatbot, want token-level streaming, or need human-in-the-loop approvals |
| State | Stateless — each call is independent | Stateful per session_id (memory carries across turns when MemoryConfig.enable_session_memory=True) |
Recent additions
The recent agent revamp introduced theTool / ToolInput system, an auto-generated catalogue of ~200 integration tools (vectorshift.agent.tools), and Session objects with streamed events.
What’s next
Reference
Every public method, grouped by topic.
Examples
Runnable examples to copy-paste and adapt.
Session
Multi-turn streaming on top of an Agent.
