
Security News
pnpm 11.5 Adds Support for Recognizing npm Staged Publishes
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.
@agentick/agent
Advanced tools
Opinionated agent composition for Agentick. Provides the <Agent> component and createAgent() factory — high-level building blocks on top of @agentick/core primitives.
pnpm add @agentick/agent
import { createAgent } from "@agentick/agent";
import { knob } from "@agentick/core";
import { openai } from "@agentick/openai";
const agent = createAgent({
system: "You are a helpful researcher.",
model: openai("gpt-4o"),
tools: [SearchTool, Calculator],
knobs: {
mode: knob("broad", { description: "Search mode", options: ["broad", "deep"] }),
},
});
const session = await agent.session();
await session.send({
messages: [{ role: "user", content: [{ type: "text", text: "Research quantum computing" }] }],
}).result;
import { Agent } from "@agentick/agent";
import { useKnob, createApp } from "@agentick/core";
import { openai } from "@agentick/openai";
function MyAgent() {
const [verbose] = useKnob("verbose", false, { description: "Verbose output" });
return (
<Agent
system={`You are a researcher. ${verbose ? "Be thorough." : "Be concise."}`}
model={openai("gpt-4o")}
tools={[SearchTool]}
temperature={0.7}
tokenBudget={{ maxTokens: 8000, headroom: 500 }}
>
<MyCustomSection />
</Agent>
);
}
const app = createApp(MyAgent);
<Agent> ComponentRenders common agent boilerplate in order:
<Knobs /> section + set_knob tool| Prop | Type | Description |
|---|---|---|
system | string | System prompt (rendered as a model-visible section) |
model | EngineModel | Model adapter |
tools | ToolClass[] | Tools the model can call |
knobs | Record<string, KnobDescriptor> | Declarative knobs (each bound via useKnob) |
children | ReactNode | Additional children (sections, tools, etc.) |
responseFormat | ResponseFormat | Structured output format |
temperature | number | Sampling temperature |
maxTokens | number | Max output tokens |
topP | number | Top-p (nucleus) sampling |
providerOptions | ProviderGenerationOptions | Provider-specific options |
timeline | AgentTimelineConfig | false | Timeline options, or false to suppress |
tokenBudget | AgentTokenBudgetConfig | Token budget for timeline compaction |
sections | AgentSectionConfig[] | Declarative sections rendered in order |
Control timeline compaction via the tokenBudget prop:
<Agent
tokenBudget={{
maxTokens: 4000,
strategy: "sliding-window", // "truncate" | "sliding-window" | custom function
headroom: 500, // reserve tokens for safety margin
onEvict: (entries) => console.log(`Evicted ${entries.length} entries`),
}}
/>
The budget props are forwarded to <Timeline>. See the core README for details on compaction strategies.
Request structured output via the responseFormat prop:
// JSON output
<Agent model={model} responseFormat={{ type: "json" }} />
// JSON Schema (structured output)
<Agent
model={model}
responseFormat={{
type: "json_schema",
schema: { type: "object", properties: { answer: { type: "string" } } },
name: "response",
}}
/>
For Zod schemas, call zodToJsonSchema() yourself. The format is forwarded to <Model> and mapped to the provider's native format by the adapter.
// Suppress timeline entirely
<Agent timeline={false} />
// Filter timeline
<Agent timeline={{ limit: 20, roles: ["user", "assistant"] }} />
<Agent
sections={[
{ id: "context", content: "Today is Monday." },
{ id: "rules", content: <MyRulesComponent />, audience: "model" },
]}
/>
createAgent(config, options?)Create an App from a config object — no JSX required.
const app = createAgent(
{
system: "You are helpful.",
model: openai("gpt-4o"),
tools: [SearchTool],
},
{ maxTicks: 10 },
);
const result = await app.run({ messages: [...] }).result;
config accepts all AgentProps except children. For conditional tools, hooks, or composition, use <Agent> directly.
agentComponent(config)Convert an AgentConfig to a ComponentFunction for use with session.spawn():
const result = await ctx.spawn(
agentComponent({ system: "Summarize this.", model: summaryModel }),
{ messages: [...] },
);
// Components
export { Agent } from "./agent";
export { createAgent, agentComponent } from "./create-agent";
// Types
export type {
AgentProps,
AgentTokenBudgetConfig,
AgentTimelineConfig,
AgentSectionConfig,
} from "./agent";
export type { AgentConfig } from "./create-agent";
FAQs
Opinionated agent composition for Agentick
We found that @agentick/agent demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.