ia-agents
import { createAgentSession } from '@philschmid/agent';
const session = createAgentSession({ model: 'gemini-3-flash-preview', systemInstruction: 'You are a helpful file assistant. Be concise.', tools: ['read', 'plan'],});
session.send('Explore the current directory');
for await (const event of session.stream()) { console.log(event);}import * as fs from 'node:fs';import { type AgentTool, agentLoop, printStream } from '@philschmid/agents-core';
// Define tool with AgentTool typeconst listDirTool: AgentTool = { name: 'list_dir', label: 'List Directory', description: 'Lists the contents of a directory.', parameters: { type: 'object', properties: { directory_path: { type: 'string', description: 'Path to directory' }, }, required: ['directory_path'], }, execute: async (_id, args) => { const items = fs.readdirSync(args.directory_path as string); return { result: items.join(', ') }; },};
// Run the agent loop and print formatted outputconst stream = agentLoop([{ type: 'text', text: 'List my files in the current directory' }], { model: 'gemini-3-flash-preview', tools: [listDirTool],});
await printStream(stream, { verbosity: 'verbose',});An agent is an LLM running in a loop with tools it can use. The loop continues until the model produces a response without tool calls.
ia-agents provides the orchestration layer on top of the Gemini Interactions API — handling the full loop: model calls, tool execution, result submission, and streaming events.
New to Agents?
Start with the Quickstart to get your first agent running in 5 minutes.
Packages
Section titled “Packages”| Package | What it provides | Use when |
|---|---|---|
@philschmid/agents-core | Raw agent loop, tool execution | You want minimal overhead and full control |
@philschmid/agent | Hooks, built-in tools, skills, subagents | You want lifecycle control and batteries-included |
Next Steps
Section titled “Next Steps” Quickstart Get running in 5 minutes
agents-core Minimal agent loop
agent Hooks and built-in tools
Hooks Intercept lifecycle events