Register and share your invite link to earn from video plays and referrals.

Search results for AgentLoop
AgentLoop community
One keyword maps to one global community path.
Create community
People
Not Found
Tweets including AgentLoop
Securing AI Agents on Alibaba Cloud: The Constraint Infra ️ Solve Agent chaos with a robust governance layer: ✅ Dynamic Control: Hot-update Prompts/rules via Nacos. ✅ Granular Governance: Token limits & multi-agent security. ✅ Proven in Prod: StarOps SRE Agent runs high-risk tasks safely within these boundaries. ✅ Self-Evolving: Rules iterate via AgentLoop data flywheel. Build safer, smarter Agents! 🚀 #AI# #AlibabaCloud# #Nacos# #Higress# #StarOps# #AgentLoop#
Show more
# Practical ways to use the Claude Agent SDK 🔧 Define your internal APIs, databases, and domain logic with `@tool` and let Claude call them. Custom Tools lets you define your own functions as in-process MCP servers using the `@tool` decorator, making them callable by Claude during conversations. 📌 Title: Providing Custom Tools to Claude 🔗 URL: 🧩 Overview Define tools with `@tool` (Python) / `tool()` (TypeScript) specifying name, description, schema, and handler. Wrap with `create_sdk_mcp_server` and pass to `mcp_servers`. Annotate side-effect-free tools with `readOnlyHint: true` for parallel execution. 🛠 How to use it Define tools with `@tool` (Python) / `tool()` (TypeScript) specifying name, description, schema, and handler. Wrap with `create_sdk_mcp_server` and pass to `mcp_servers={"weather": server}`. Tools are exposed to Claude as `mcp__weather__get_temperature`. 🏗 Practical usage - Define internal APIs (customer info, inventory, order status) as `@tool` and build agents that respond to natural language queries. - Add `readOnlyHint: true` to read-only tools for parallel execution and lower latency. - Catch exceptions in handlers and return `is_error=True` so the agent loop continues and Claude retries or tries alternatives. - Return chart images via `image` blocks (base64) for Claude to analyze visually. 💡 Use cases 🏢 Natural language access to internal APIs 📊 Chart generation + image analysis pipeline 🔄 Fault-tolerant autonomous retry ⚠️ Watch out Uncaught exceptions in handlers crash the entire `query()`. Always handle errors. Use `tools: ["Read","Grep"]` to restrict which built-in tools are available. #ClaudeAgentSDK# #AI#
Show more
NVIDIA pitching a max single-threaded CPU for agents is basically an admission that the agent loop is bottlenecked by sequential reasoning, not GPU throughput. Which is real, but most of the agent slowdowns we actually hit aren't compute at all, they're the loop stalling on a tool call while some external API or sandbox takes its time. A faster core doesn't touch that.
Show more
A useful but little-known OpenAI API feature 🗜 Ever had a long-running AI agent crash halfway because it ran out of context window? There's a fix for that. OpenAI's "Compaction" automatically compresses the conversation context of long-running agents, preventing context overflow. It's essential for agents that need to keep going through many steps. 📌 Title: Compaction 🔗 URL: 🧩 Overview When agents take many steps, the conversation history grows until it hits the context window limit. Traditionally, you'd have to manually truncate or summarize history yourself. Compaction automates this: it preserves the important information while compressing older exchanges to free up context space. 🛠 How to use it Enable compaction in your Responses API configuration. When the context approaches the threshold, the model automatically summarizes and compresses past conversation turns. No custom compression logic needed on your side. Just plug it into your agent loop. 🏗 Building it into production ・Coding agents: sessions that read and write dozens of files won't stall out from context overflow. ・Research agents: tasks that traverse many sources to gather information can run to completion instead of dying mid-way. ・Long customer support sessions: complex inquiries with many back-and-forth turns stay stable while retaining past context. ・Data processing pipelines: agents running multi-stage analysis steps within a single session. 💡 Use cases 🤖 Multi-step coding agents 🔬 Extended research and investigation tasks 💬 Complex customer support conversations 📊 Multi-stage data analysis pipelines ⚠️ Watch out Compression can lose fine-grained details and nuances from earlier in the conversation. Put critical instructions and rules in the system prompt where they won't be compressed. Compaction itself also consumes tokens, so it's unnecessary overhead for short tasks. ✨ The agent that's supposed to get smarter the longer it runs shouldn't lose its memory halfway through. Try Compaction on your longest-running agents first. #OpenAI# #LLM#
Show more
AI coding agents might create an unexpected problem: More code. Less shared knowledge. If an engineer solves a problem through an AI agent, a lot of the reasoning can stay inside a private human-agent loop. No Stack Overflow answer. No GitHub discussion. No detailed issue thread. Sometimes not even a meaningful commit message. We may become dramatically better at producing software while becoming worse at producing the public knowledge that future engineers learn from. That tradeoff deserves much more attention.
Show more
Is Grep All You Need? The surprising result is not that grep is powerful, but that agent design makes it powerful. The paper says not that grep beats vectors, but that agents fail or win through their harness. That sounds like a small distinction until you look at what was actually tested. The authors compare grep-style search and vector retrieval across LongMemEval tasks, where agents must recover facts from long conversation histories full of distractors. Inline grep beats inline vector across every harness-model pair in their main experiment, sometimes by wide margins. The tempting headline is that vector databases are overbuilt for coding agents. The better reading is sharper: when the answer is anchored in literal evidence, names, dates, file paths, function names, error strings, user preferences, grep gives the model a clean mechanical advantage. Embeddings are built to tolerate paraphrase, but tolerance has a cost. They can pull in semantically nearby clutter, especially when a short agent query is vague. Grep has the opposite failure mode. It is dumb, cheap, and narrow, but when the agent knows the right string to hunt for, dumb becomes a feature. The deeper finding is that retrieval is not a component you can benchmark in isolation. The same search method behaves differently depending on whether results are injected inline, written to files, routed through a CLI, or wrapped in a custom agent loop. So the question is not “Do we still need vector databases?” The question is whether your agent is solving a semantic discovery problem or an evidence-location problem. For coding agents, a surprising amount of work is evidence-location: find the symbol, trace the call, inspect the diff, read the failing test, recover the exact line. Vectors still matter at scale and for fuzzy conceptual search, but this paper weakens the lazy default that every serious agent stack begins with embeddings. Sometimes the upgrade is not a smarter index. Sometimes it is giving the model primitive tools, clean files, disciplined context, and a harness that lets exact search do exact work. ---- Paper Link – arxiv. org/abs/2605.15184 Paper Title: "Is Grep All You Need? How Agent Harnesses Reshape Agentic Search"
Show more
the ampersend Marketplace we launched earlier today catalogs 40+ pay-per-use APIs that agents can call directly from their wallet. here's what some of them do and where they fit in an agent loop. the call pattern is the same across every service. the agent sends a request, x402 handles settlement in solana:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v on @base, and the response comes back in the same call. the agent never touches an API key or account credential. @coingecko exposes token prices, liquidity, and market data at a flat $0.01 usdc per request. an agent that needs a price feed inside its loop can pull live data without preregistering anywhere. @Quicknode runs wallet-authenticated blockchain endpoints across 130+ networks. agents pay per rpc request via x402 with three patterns available: per-request, nanopayment, and credit. useful for any agent doing onchain reads or writes that needs broad chain coverage. @zapper_fi covers multi-chain wallet portfolios, token rankings, nft data, defi balances, and social identity across ens, farcaster, lens, and basenames. 17 x402 endpoints in total, so agents building a portfolio view or doing wallet diligence can pull all of it from one provider. @zerion is tuned for portfolio tracking specifically, with 19 x402 endpoints under /v1/wallets/{address}/* covering positions, transaction history, nft holdings, and pnl across evm chains. agents reconciling holdings or surfacing pnl pull from these directly. @AlliumLabs brings institutional-grade onchain analytics across 150+ chains. structured token prices, balances, transaction histories, and portfolio data sit on top of raw rpc reads for agents that need analytical depth. @ExaAILabs handles web search and content retrieval for agents. two endpoints with multiple search modes including instant, fast, deep, and deep-reasoning. strong fit for research agents that need live web context inside the loop. @nansen_ai exposes 500m+ labeled wallets, smart money flows, and token screeners pay-per-call. basic tier at $0.01 covers screeners, balances, and pnl, while premium at $0.05 unlocks the rest. every endpoint lists its exact price in $usdc on @base, with x402 handling settlement under the hood. agents pay per call from their own wallet with no subscription in the loop. browse the full catalog:
Show more
Just met with one of our engineering leaders. Some takeaways about AI engineering best practices + more: 1) Spec writing and strong reading comprehension are two of the most valuable skills in ai engineers today. 2) Being hyper structured and opinionated in engineering workflows is how you get probabilistic models to behave deterministically when you want them to and also get models to spend tokens efficiently. 3) Creating a standardized schema/metadata on markdown files in your workflows allows you to make non-software tasks verifiable which allows you to close the agent loop more successfully. 4) One of the bigger behavioral changes in knowledge work is learning to thoughtfully structure/organize your files like good engineers have always done to get the least entropy from models. 5) Building a strong immune system around markdown files is important. As a workflow evolves and gets more reps it’s easy for specs to get bloated with conflicting guidance/unnecessary rules. Hermes agents solves this with a thin memory layer. There’s still a lot of optimization to be done with memory/markdown autophagy. 6) The key ingredients of our engineering process are CLI + deeply opinionated folder/file system + markdown metadata + coding agents + linear as source of truth. 7) Our mental model is always how can we make sure the agent has one way to do things and can validate its output.
Show more
# Practical and Useful Patterns for OpenAI Agent SDK 🌍 Can you see what is happening inside your agent? Lifecycle hooks let you transparently embed logging, auditing, and performance optimization into agent behavior. RunHooks and AgentHooks let you inject custom logic at agent start/end, LLM calls, tool execution, and handoff events. 📌 Title: Agents -- Lifecycle events (hooks) 🔗 URL: 🧩 Overview The OpenAI Agent SDK provides a hook mechanism for executing custom code at each stage of an agent's lifecycle. `RunHooks` apply to the entire workflow, while `AgentHooks` apply to specific agents. Available hooks include `on_agent_start`/`on_agent_end`, `on_llm_start`/`on_llm_end`, `on_tool_start`/`on_tool_end`, and `on_handoff`. Use them to implement logging, metrics collection, audit trails, and data prefetching. 🛠 How to Use Define a `LoggingHooks` class extending `RunHooks`, overriding `async def on_agent_start(self, context, agent)` and `async def on_agent_end(self, context, agent, output)` to log agent lifecycle events. Create an `Agent` and pass the hooks instance via ` "Hello", run_hooks=LoggingHooks())`. 🏗 Practical Usage Patterns **Output Item Count Logging with on_llm_end, Token Usage Logging with on_agent_end** Combine workflow-wide RunHooks with agent-specific AgentHooks for comprehensive monitoring. `MetricsRunHooks` extends `RunHooks` and logs `total_tokens` and `prompt_tokens` in `on_agent_end` for workflow-wide cost monitoring. `DetailedAgentHooks` extends `AgentHooks` and logs the output item count from `response.output` in `on_llm_end` for agent-specific monitoring. Apply agent-level hooks via `Agent(hooks=DetailedAgentHooks())` and workflow-level hooks via ` ..., run_hooks=MetricsRunHooks())` for comprehensive observability. **Audit Logging and Distributed Tracing with on_tool_start ToolContext** Record trace information before and after tool execution to simplify incident investigation. `AuditHooks` extends `AgentHooks` and implements `on_tool_start` to log `context.context.trace_id`, ` ` and a UTC timestamp for distributed tracing. In `on_tool_end`, it logs the same `trace_id` and ` along with a success check (`result is not None`) to complete the audit trail. **Data Prefetching on Handoff for Latency Reduction** Pre-fetch data needed by the target agent during handoff to improve response times. `PrefetchHooks` extends `RunHooks` and implements `on_handoff` to check if ` is `"OrderSupportAgent"`. When matched, it calls `await db.fetch_orders( and `await db.fetch_payment_methods( to pre-load data into the user context, reducing latency for the target agent. 💡 Use Cases 📊 Log LLM response output item counts with on_llm_end for output quality monitoring 💰 Log token usage with on_agent_end and feed into cost management dashboards 🔍 Automatically record audit logs and distributed traces with on_tool_start/end ⚡ Prefetch data on_handoff for the target agent to reduce response latency ⚠️ Caveats - Exceptions inside hooks can affect agent execution. Always wrap hook logic in try/except for reliable error handling. - Heavy processing in hooks increases overall agent latency. Consider async I/O or background tasks. - Be intentional about RunHooks vs AgentHooks. Use RunHooks for cross-workflow monitoring and AgentHooks for detailed monitoring of specific agents. ✨ Lifecycle hooks transform your agent from a "black box" into a fully observable system. Implement the monitoring, auditing, and optimization essential for production -- without polluting your agent logic! #OpenAIAgentSDK# #AIAgent#
Show more